.mobile-contact,
.hero-mobile-news,
.news-all-mobile {
  display: none;
}

/* The sticky header and in-page navigation use the same offset. */
@media (max-width: 850px) {
  html {
    --mobile-header-height: 64px;
    --mobile-gutter: clamp(16px, 5.5vw, 30px);
    scroll-padding-top: calc(var(--mobile-header-height) + 10px);
  }

  html.mobile-menu-open {
    overflow: hidden;
  }

  .site-header {
    height: var(--mobile-header-height);
    align-items: center;
    gap: 8px;
    padding-inline: var(--mobile-gutter) 8px;
    box-shadow: 0 1px 0 #102c471a;
  }

  .site-header .brand {
    flex: 0 1 220px;
    min-width: 0;
    min-height: 44px;
    padding: 0;
    margin-right: auto;
  }

  .site-header .brand .brand-logo {
    width: 100%;
  }

  .mobile-contact {
    flex: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 9px;
    border: 1px solid #c6dedf;
    border-radius: 6px;
    color: #006c70;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
  }

  .site-header .menu-toggle {
    flex: 0 0 52px;
    align-self: center;
    width: 52px;
    min-height: 48px;
    margin: 0;
    padding: 4px;
    gap: 4px;
    border-radius: 6px;
    background: #102c47;
    color: #fff;
  }

  .menu-toggle .menu-icon {
    display: grid;
    gap: 4px;
    width: auto;
    height: auto;
    background: none;
    transform: none;
  }

  .menu-toggle .menu-icon > span {
    width: 19px;
    height: 2px;
  }

  .menu-toggle .menu-label {
    width: auto;
    height: auto;
    background: none;
    font-size: 9px;
    line-height: 1.3;
    font-weight: 700;
    opacity: 1;
    transform: none;
  }

  .menu-toggle[aria-expanded="true"] .menu-icon {
    transform: none;
  }

  .menu-toggle[aria-expanded="true"] .menu-icon > span:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-icon > span:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-label {
    opacity: 1;
  }

  .mobile-nav:not([hidden]) {
    inset: var(--mobile-header-height) 0 0;
    padding: 12px max(var(--mobile-gutter), calc((100% - 520px) / 2))
      max(16px, env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    background: #fff;
  }

  .mobile-nav a {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 53px;
    padding: 10px 8px;
    color: #102c47;
    font: 700 16px/1.5 'Noto Sans JP', sans-serif;
  }

  .mobile-nav a small {
    color: #476675;
    font: 700 10px/1 Montserrat, sans-serif;
    letter-spacing: .08em;
  }

  .mobile-nav a:last-child {
    color: #006c70;
  }

  .site-header :focus-visible,
  .mobile-nav a:focus-visible {
    outline-offset: -3px;
  }

  main :is(.detail-section, .design-section, .rc-section)[id],
  main .rc-work[id] {
    scroll-margin-top: 0;
  }

  .home-page .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
    align-items: center;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 42px var(--mobile-gutter) 20px;
    column-gap: 24px;
    background: linear-gradient(155deg, #fff 20%, #f1f8f7 100%);
  }

  .home-page .hero-content {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    padding: 0;
  }

  .home-page .hero h1 {
    font-size: clamp(36px, 6.4vw, 55px);
    line-height: 1.2;
    letter-spacing: -.025em;
    margin-bottom: 20px;
  }

  .home-page .hero-lead {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 12px;
  }

  .home-page .hero-sub {
    font-size: 14px;
    line-height: 1.85;
    margin-bottom: 20px;
  }

  .home-page .hero-lead br,
  .home-page .hero-sub br {
    display: none;
  }

  .home-page .hero-photo {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 1.15;
    overflow: hidden;
    background: #dce9e8;
    border-radius: 8px;
  }

  .home-page .hero-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
  }

  .home-page .hero-gradient,
  .home-page .hero-bottom {
    display: none;
  }

  .hero-mobile-news {
    grid-column: 1 / -1;
    display: inline-flex;
    justify-self: end;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-top: 8px;
    padding-inline: 8px;
    color: #006c70;
    font-size: 13px;
    font-weight: 700;
  }

  .home-page .newsbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 16px;
    padding-block: 28px 34px;
  }

  .home-news-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    margin: 0;
    align-items: center;
  }

  .home-page .home-news-heading h2 {
    font-size: 26px;
    margin: 0;
  }

  .home-page .home-news-heading p {
    grid-column: 1;
    grid-row: 2;
    order: 0;
    font-size: 12px;
    margin: 0;
  }

  .home-news-heading > a {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding-inline: 12px;
    border: 1px solid #c6dedf;
    border-radius: 6px;
    color: #006c70;
    font: 700 12px/1.5 'Noto Sans JP', sans-serif;
  }

  .news-all-default {
    display: none;
  }

  .news-all-mobile {
    display: inline;
  }

  .home-news-items {
    border-block: 1px solid var(--line);
  }

  .home-news-row,
  .home-news-row:first-child,
  .home-news-row:last-child {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 4px 16px;
    min-height: 68px;
    padding-block: 13px;
  }

  .home-news-row > span {
    color: #006c70;
    font-size: 10px;
    letter-spacing: .06em;
  }

  .home-page .home-news-row p {
    grid-column: 1;
    order: 0;
    font-size: 15px;
    line-height: 1.6;
  }

  .home-news-row b {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: center;
    color: #006c70;
  }

  .footer-nav a,
  main .text-link,
  .design-anchor a,
  .rc-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  main .text-link {
    color: #006c70;
  }

  .home-page .carousel-controls button {
    min-width: 44px;
    min-height: 44px;
  }

  .detail-main.wrap {
    padding-block: 48px 68px;
  }

  .contact-options article,
  .company-table dd {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 600px) {
  .home-page .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: clamp(28px, 8vw, 44px);
    row-gap: 16px;
  }

  .home-page .hero-photo {
    grid-column: 1;
    grid-row: 2;
    aspect-ratio: 1.55;
  }

  .hero-mobile-news {
    margin-top: -9px;
  }

  .home-page :is(.section-copy, .works-intro, .recruit-copy, .section-heading-line, .contact-inner, .business-card, .strength-grid) p:not(.overline):not(.tiny-label) {
    font-size: 14px;
    line-height: 1.85;
  }

  .home-page :is(.section-copy, .works-intro, .recruit-copy, .section-heading-line, .contact-inner) p:not(.overline) br {
    display: none;
  }

  .home-page .business-body {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .home-page .business-number {
    font-size: 30px;
  }

  .footer-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 12px;
  }

  .footer-nav a {
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .site-header {
    gap: 6px;
    padding-left: 12px;
  }

  .mobile-contact {
    padding-inline: 7px;
    font-size: 11px;
  }

  .site-header .menu-toggle {
    flex-basis: 46px;
  }
}
