/* Mobile composition is deliberately independent from the accepted desktop scene. */
.mobile-copy { display: none !important; }
.mobile-header-action, .mobile-project-toolbar, .mobile-dock { display: none; }
.desktop-copy { display: contents; }
.media-card figcaption .desktop-copy { display: contents; font: inherit; letter-spacing: inherit; text-transform: none; color: inherit; }
.mobile-detail-sheet:not([open]) { display: none; }

@media (max-width: 63.99rem) {
  html { scroll-padding-top: 5rem; }
  body { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
  .desktop-copy { display: none !important; }
  .mobile-copy { display: inline !important; }
  .shell, .hero__inner, .site-header .shell { width: calc(100% - 2rem); }
  .site-header { position: sticky; top: 0; z-index: 20; background: #f3ede3; border-bottom: 1px solid #16191f10; }
  .site-header__inner { display: flex; justify-content: space-between; gap: 1rem; min-height: 4.5rem; padding-block: .6rem; }
  .identity { min-height: 44px; justify-content: center; }
  .identity__name { font-size: .76rem; font-weight: 550; }
  .identity__role { margin-top: .12rem; font-size: .66rem; }
  .site-nav, .site-header__inner > .button { display: none; }
  .mobile-header-action { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid #16191f26; border-radius: 50%; }
  .mobile-header-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
  .hero__inner { display: block; min-height: 0; padding-block: 2.4rem 2rem; }
  .hero__editorial { padding: 0; }
  .hero .eyebrow, .hero__lead-detail, .system-sculpture, .hero__scroll-cue { display: none; }
  .hero h1 { margin-bottom: 1.2rem; font-size: clamp(2rem, 10.3vw, 4.4rem); font-weight: 500; line-height: 1.12; letter-spacing: -.065em; }
  .hero__lead { font-size: .91rem; line-height: 1.65; max-width: 30rem; }
  .hero__footer { display: flex; align-items: start; flex-direction: column; gap: 1rem; margin-top: 1.4rem; padding-top: 0; border: 0; }
  .hero__footer .actions { width: 100%; }
  .hero__footer .actions .button { min-height: 48px; padding-inline: 1.1rem; width: 100%; justify-content: space-between; border-radius: 12px; background: #191c20; }
  .hero__footer .hero__contact { display: none; }
  .hero__responsibility { font-size: .64rem; line-height: 1.5; color: #61615f; max-width: 25rem; }
  .hero__responsibility br { display: none; }
  .projects { padding: .7rem 0 2.3rem; background: var(--paper); }
  .projects > .shell { width: 100%; }
  .projects .section-intro { margin: 0 1rem .15rem; }
  .projects .section-intro > p { display: none; }
  .projects .section-intro h2 { margin: 0; font-size: 1.1rem; line-height: 1.5; font-weight: 500; letter-spacing: -.04em; }
  .mobile-project-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 0 1rem .6rem; }
  .mobile-project-toolbar p { margin: 0; font-size: .7rem; color: #61615f; }
  .mobile-project-toolbar p span { margin-left: .6rem; color: #ac452c; }
  .mobile-project-controls { display: none; align-items: center; gap: .3rem; }
  html.mobile-ui .mobile-project-controls { display: flex; }
  .mobile-project-controls button { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; background: transparent; border: 1px solid #16191f25; border-radius: 50%; color: var(--ink); font-size: 1rem; }
  .mobile-project-controls button:disabled { opacity: .28; }
  [data-mobile-counter] { min-width: 3.1rem; font-size: .64rem; text-align: center; font-variant-numeric: tabular-nums; }
  .projects__canvas { display: flex; align-items: stretch; gap: .75rem; padding: .2rem 1rem 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 1rem; overscroll-behavior-x: contain; scrollbar-width: none; }
  .projects__canvas::-webkit-scrollbar { display: none; }
  .case, .case--autohome, .case--proof { flex: 0 0 calc(100% - 1.25rem); max-width: 31rem; min-width: 0; display: flex; flex-direction: column; gap: .8rem; padding: 1.1rem; margin: 0; scroll-snap-align: start; scroll-snap-stop: normal; border: 1px solid #ffffff12; border-radius: 22px; background: #191c20; color: #f3ede3; box-shadow: none; }
  .case + .case { margin: 0; }
  .case__overview { display: contents; }
  .case__lead { padding: 0; border: 0; min-height: 8.7rem; }
  .case__title-row { flex-direction: column-reverse; align-items: start; gap: .7rem; }
  .case__title-row h3 { font-size: clamp(1.5rem, 6.7vw, 2.5rem); font-weight: 440; letter-spacing: -.055em; line-height: 1.2; text-wrap: initial; }
  .case .status { margin: 0; padding: 0; border: 0; border-radius: 0; color: #ffac93; font-size: .64rem; font-weight: 450; line-height: 1.5; }
  .case__result { margin-top: .7rem; font-family: var(--body); font-size: .95rem; font-weight: 500; letter-spacing: -.015em; line-height: 1.5; }
  .case__date { color: #bebcb6; margin-top: .45rem; font-size: .6rem; font-weight: 450; letter-spacing: 0; text-transform: none; }
  .case .facts { display: none; }
  .case__snapshot { display: block; border: 0; margin: 0; }
  .case-snapshot-item { display: none; }
  .case-snapshot-item:nth-child(2) { display: block; padding: 0; border: 0; font-size: .72rem; line-height: 1.5; color: #c7c5bf; }
  .case-snapshot-item .case-step__label { display: none; }
  .case__media-grid, .case--autohome .case__media-grid, .case__media-grid--proof { display: flex; flex-direction: column; gap: .7rem; margin-top: auto; }
  .media-card__frame, .media-card__frame--portrait { border: 1px solid #ffffff26; border-radius: 10px; background: #303337; padding: 4px; aspect-ratio: auto; }
  .media-card__frame img { border-radius: 6px; }
  .media-card__open { right: .5rem; bottom: .5rem; padding: .35rem .5rem; font-size: .55rem; font-weight: 500; border: 0; }
  .media-card figcaption { padding: .45rem 0 0; font-size: .62rem; color: #c7c5bf; line-height: 1.5; }
  .media-card figcaption > span:first-child { display: none; }
  .media-card figcaption .mobile-copy { display: inline; color: inherit; font: inherit; letter-spacing: 0; text-transform: none; }
  .case .media-card--supporting { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: .6rem; width: 100%; }
  .media-card--supporting .media-card__frame { display: grid; width: 44px; height: 44px; place-items: center; padding: 2px; border-radius: 6px; }
  .media-card--supporting img { width: auto; max-width: 100%; max-height: 38px; border-radius: 2px; }
  .media-card--supporting .media-card__open { display: none; }
  .media-card--supporting figcaption { padding: 0; font-size: 0; }
  .media-card--supporting figcaption > span:first-child { display: inline; color: #c7c5bf; font-family: var(--body); font-size: .67rem; font-weight: 450; text-transform: none; letter-spacing: 0; }
  .media-card--supporting figcaption .mobile-copy { font: inherit; color: inherit; }
  .media-card--supporting figcaption > span:first-child::after { content: ' ↗'; color: #ffac93; }
  .case__actions-row, .case__actions { display: block; width: 100%; }
  .case__actions .button--primary { display: none; }
  .case__actions .button--outline { width: 100%; min-height: 44px; justify-content: space-between; padding: .8rem 1rem; border: 1px solid #f3ede32e; border-radius: 10px; color: #f3ede3; font-size: .76rem; font-weight: 500; }
  .case__actions .mobile-copy { width: 100%; text-align: left; }
  .approach, .more-projects, .about { display: none; }
  .contact { padding-block: 2rem 2.5rem; background: var(--paper); border-top: 1px solid #16191f20; }
  .contact__grid { display: block; }
  .contact .eyebrow, .contact__copy > p, .brief { display: none; }
  .contact h2 { margin-bottom: 1.2rem; font-size: 1.65rem; font-weight: 450; letter-spacing: -.04em; }
  .contact__actions { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
  .contact__actions .button { flex: 1 0 100%; min-height: 52px; border-radius: 12px; border: 0; background: #ac452c; color: #fffdf8; font-size: .82rem; font-weight: 550; box-shadow: none; }
  .contact__actions > a:not(.button) { min-height: 44px; display: inline-flex; align-items: center; font-size: .76rem; }
  .site-footer { padding-block: 1rem; border-top: 1px solid #16191f12; background: var(--paper); }
  .contact__footer { display: block; padding: 0; border: 0; font-family: var(--body); font-size: .62rem; text-align: center; text-transform: none; font-weight: 450; }
  .footer-nav { display: none; }
  .mobile-dock { position: fixed; z-index: 40; inset: auto 1rem calc(.75rem + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; max-width: 30rem; margin-inline: auto; padding: .45rem; border: 1px solid #ffffff18; border-radius: 20px; background: #191c20; color: #bbbdbf; box-shadow: 0 8px 30px #0002; }
  .mobile-dock a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; min-height: 52px; padding: .35rem; border-radius: 13px; font-size: .61rem; line-height: 1.2; text-decoration: none; }
  .mobile-dock a[aria-current] { background: #f3ede312; color: #f3ede3; }
  .mobile-dock svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
  html.lightbox-open .mobile-dock, html.mobile-sheet-open .mobile-dock { visibility: hidden; }
  html.mobile-sheet-open { overflow: hidden; }
  .mobile-detail-sheet { position: fixed; inset: auto 0 0; width: 100%; max-width: 100%; max-height: 90svh; margin: 0; padding: 0; border: 1px solid #16191f15; border-radius: 24px 24px 0 0; background: var(--paper-soft); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; }
  .mobile-detail-sheet::backdrop { background: #16191f99; }
  .mobile-sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.25rem .9rem; background: var(--paper-soft); border-bottom: 1px solid #16191f20; }
  .mobile-sheet-head p { margin-bottom: .3rem; font-size: .64rem; color: var(--muted); }
  .mobile-sheet-head h2 { margin: 0; font-size: 1.1rem; font-weight: 550; line-height: 1.3; }
  .mobile-sheet-head button { flex: 0 0 44px; height: 44px; border: 1px solid #16191f30; border-radius: 50%; background: transparent; color: inherit; font-size: 1rem; }
  .mobile-sheet-content { padding: 1.25rem 1.25rem calc(2rem + env(safe-area-inset-bottom)); }
  .mobile-sheet-content .facts { margin: 0 0 1.4rem; gap: .5rem; }
  .mobile-sheet-content .facts li { font-size: .7rem; font-weight: 500; border-color: #16191f25; }
  .mobile-sheet-content .case-details { display: block; padding: 0; border: 0; }
  .mobile-sheet-content .case-details__head { display: none; }
  .mobile-sheet-content .case-details__grid { display: block; }
  .mobile-sheet-content .case-step { display: block; padding-block: 1rem; font-size: .9rem; }
  .mobile-sheet-content .case-step__label { margin-bottom: .5rem; color: #ac452c; font-size: .63rem; }
  .mobile-sheet-content .case__date { color: var(--muted); margin: -.7rem 0 1.2rem; }
  /* Native anchor fallback can expand a case without a modal or JavaScript. */
  html:not(.mobile-ui) .projects__canvas:has(.case-details:target) { display: block; }
  html:not(.mobile-ui) .case:has(.case-details:target) { max-width: none; }
  html:not(.mobile-ui) .case:has(.case-details:target) .facts { display: flex; }
  html:not(.mobile-ui) .case:has(.case-details:target) .case-snapshot-item { display: block; }
  html:not(.mobile-ui) .case-details:target { color: #f3ede3; }
  html:not(.mobile-ui) .case-details:target .case-step { display: block; }
  .lightbox { padding: .5rem; }
  .lightbox__dialog { max-height: calc(100svh - 1rem); border-radius: 16px; border-width: 1px; box-shadow: 0 16px 60px #0003; }
  .lightbox__header { padding: .8rem; }
  .lightbox__header h2 { font-size: .8rem; line-height: 1.4; }
  .lightbox__eyebrow { display: none; }
  .lightbox__header-actions { flex-wrap: nowrap; gap: .4rem; }
  .lightbox__count { min-width: 2rem; font-size: .6rem; }
  .lightbox__close { min-height: 44px; padding-inline: .65rem; border-radius: 10px; font-size: .7rem; font-weight: 500; }
  .lightbox__image-button { height: auto; min-height: 0; padding: .6rem; }
  .lightbox__image { width: auto; height: auto; max-width: 100%; max-height: calc(100svh - 18rem); }
  .lightbox__nav { border-width: 1px; border-radius: 10px; font-size: .65rem; font-weight: 500; }
  .lightbox__footer { padding: .8rem; gap: .6rem; }
  .lightbox__caption { font-size: .7rem; }
  .lightbox__pointer-hint { display: none; }
}
@media (min-width: 64rem) {
  .media-card figcaption .desktop-copy { display: contents !important; font: inherit !important; letter-spacing: inherit !important; text-transform: none !important; color: inherit !important; margin: 0 !important; }
}
@media (max-width: 22rem) {
  .case { padding: .9rem; }
  .case__lead { min-height: 10rem; }
  .hero h1 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .projects__canvas { scroll-behavior: auto; }
}

@media (min-width: 48rem) and (max-width: 63.99rem) {
  .hero__inner { width: min(calc(100% - 2rem), 42rem); }
  .hero h1 { font-size: 3.6rem; }
  .hero__footer .actions { max-width: 25rem; }
}
