/* ============================================================
   Responsive — PC基準デザインから段階的に縮小
   TB/SP専用デザインなし → 破綻しないようスタック・余白調整
   ============================================================ */

/* —— Narrow desktop (~1400px): ナビ過多でボタンが見切れるためハンバーガー化 —— */
@media (max-width: 87.5rem) {
  .header__inner {
    padding-inline: 1.5rem 1.75rem;
    gap: 1rem;
  }

  .header__menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 0.0625rem solid var(--color-border);
    padding: 1rem 1.5rem 1.25rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.06);
    z-index: 101;
    max-height: calc(100dvh - var(--header-height, 4.5rem));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .header.is-open .header__menu {
    display: flex;
  }

  .header-menu__blob {
    display: block;
    right: -3rem;
    top: -4rem;
    width: 10rem;
    height: 10rem;
    background: var(--color-peach, var(--color-primary));
    filter: blur(4rem);
    opacity: 0.22;
  }

  .header.is-open .header__search {
    display: block;
    width: 100%;
    position: relative;
    z-index: 1;
  }

  .header.is-open .header__search input {
    height: 2.375rem;
  }

  .header-menu__label {
    display: block;
    position: relative;
    z-index: 1;
    margin-top: 0;
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
  }

  .header.is-open .header__nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    position: relative;
    z-index: 1;
  }

  .header.is-open .header__nav a {
    justify-content: flex-start;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5625rem 0.25rem;
    font-size: var(--fs-13);
    box-shadow: inset 0 -0.0625rem 0 var(--color-border);
  }

  .header.is-open .header__nav a:last-child {
    box-shadow: none;
  }

  .header.is-open .header__nav a.is-active {
    background: var(--color-primary-ghost);
    border-radius: var(--radius-sm);
    border-bottom: none;
    padding-inline: 0.5rem;
  }

  .header.is-open .header-nav-link__dot,
  .header.is-open .header-nav-link__arrow {
    display: block;
  }

  .header.is-open .header__nav a:hover .header-nav-link__arrow,
  .header.is-open .header__nav a.is-active .header-nav-link__arrow {
    opacity: 1;
    transform: translateX(0.1875rem);
  }

  .header__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    margin-left: 0;
    margin-top: 0.25rem;
    padding-top: 0.75rem;
    border-top: 0.0625rem solid var(--color-border);
    position: relative;
    z-index: 1;
  }

  .header__actions .c-btn {
    width: 100%;
    justify-content: center;
    min-height: 2.375rem;
    padding-block: 0.5rem;
  }

  .header__cta {
    margin-left: 0;
  }

  .header__toggle {
    display: flex;
  }

  body.is-nav-open {
    overflow: hidden;
  }
}

/* —— Large tablet / small desktop (~1200px) —— */
@media (max-width: 75rem) {
  :root {
    --gutter: 3rem;
    --fs-64: 3.25rem;
  }

  .header__inner {
    padding-inline: 1.25rem 1.5rem;
  }

  .hero__content {
    padding: 4rem 4rem;
  }

  .features__grid {
    gap: 1rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .articles__grid {
    gap: 1.25rem;
  }

  .popular__grid {
    gap: 2.5rem;
  }

  .cta__banner {
    padding: 2.25rem 2.5rem;
  }
}

/* —— Tablet (~960px) —— */
@media (max-width: 60rem) {
  :root {
    --gutter: 2rem;
    --fs-64: 3rem;
    --fs-52: 2.5rem;
    --fs-34: 1.75rem;
    --fs-32: 1.625rem;
  }

  .hero {
    min-height: auto;
  }

  .hero__content {
    padding: 3.5rem 2rem 4rem;
    max-width: 100%;
  }

  .hero__bg img {
    object-position: 70% center;
  }

  .hero__stats {
    max-width: 100%;
  }

  .search__tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .search__fields {
    grid-template-columns: 1fr;
  }

  .features__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2.5rem;
  }

  .features__desc {
    text-align: left;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }

  .articles__head {
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1.25rem;
    margin-bottom: 2rem;
  }

  .articles__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .article-featured,
  .article-list {
    min-width: 0;
    width: 100%;
  }

  .article-list {
    min-height: 0;
  }

  .article-item {
    padding-inline: 0;
  }

  .articles__more-btn {
    margin-top: 1.25rem;
    padding-inline: 0;
  }

  .popular__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .popular__all {
    display: flex;
    width: fit-content;
    margin-left: auto;
  }

  .categories__grid {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .u-section-num {
    font-size: 10rem;
  }

  .cta {
    padding-block: 3.5rem;
  }

  .cta__banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2.75rem 2rem;
  }

  .cta__body {
    width: 100%;
  }

  .cta__title {
    font-size: 1.375rem;
  }

  .cta__btn {
    align-self: flex-start;
  }
}

/* —— Mobile (~640px) —— */
@media (max-width: 40rem) {
  :root {
    --gutter: 1.25rem;
    --fs-64: 2.25rem;
    --fs-52: 2rem;
    --fs-34: 1.5rem;
    --fs-32: 1.375rem;
    --fs-26: 1.25rem;
    --header-height: 4.5rem;
  }

  .header__inner {
    min-height: var(--header-height);
    padding: 0.75rem 1.25rem;
  }

  .header__logo {
    width: 8.5rem;
    height: 1.875rem;
  }

  .header__menu {
    gap: 0.5rem;
    padding: 0.75rem 1.25rem 1rem;
  }

  .header.is-open .header__search input {
    height: 2.25rem;
  }

  .header-menu__label {
    display: none;
  }

  .header.is-open .header__nav a {
    padding: 0.4375rem 0.25rem;
  }

  .header__actions {
    margin-top: 0;
    padding-top: 0.625rem;
    gap: 0.4375rem;
  }

  .header__actions .c-btn {
    min-height: 2.25rem;
  }

  .hero__content {
    padding: 3rem 1.25rem 3.5rem;
    gap: 0.75rem;
  }

  .hero__lead {
    font-size: var(--fs-13);
  }

  .hero__overlay {
    background: linear-gradient(
      180deg,
      rgba(253, 240, 243, 0.88) 0%,
      rgba(253, 240, 243, 0.7) 55%,
      rgba(253, 240, 243, 0.35) 100%
    );
  }

  .hero__search {
    flex-wrap: wrap;
    height: auto;
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .hero__search-icon {
    margin-left: 0.75rem;
  }

  .hero__search input {
    width: calc(100% - 3rem);
    height: 2.5rem;
  }

  .hero__search .c-btn--search-inner {
    width: 100%;
    margin: 0;
    justify-content: center;
  }

  .hero__actions {
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
  }

  .hero__actions .c-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.5625rem 0.75rem;
    font-size: var(--fs-sm);
    white-space: nowrap;
  }

  .hero__actions .icon {
    flex-shrink: 0;
  }

  .hero__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .hero__stat {
    flex: unset;
    min-width: 0;
    border-right: none;
    border-bottom: 0.0625rem solid rgba(189, 58, 93, 0.1);
    padding: 0.875rem 0.75rem;
  }

  .hero__stat:nth-child(odd) {
    border-right: 0.0625rem solid rgba(189, 58, 93, 0.1);
  }

  .hero__stat:nth-last-child(-n + 2) {
    border-bottom: none;
  }

  .search,
  .features,
  .articles,
  .popular,
  .categories {
    padding-block: 3.5rem;
  }

  .search__inner {
    padding-inline: 1.25rem;
  }

  .search__tabs {
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
  }

  .search__tab {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
  }

  .search__form {
    padding: 1.25rem;
  }

  .c-btn--primary {
    padding: 0.875rem 1.5rem;
    width: 100%;
  }

  .article-item {
    padding: 0.75rem 0;
    gap: 0.75rem;
  }

  .article-item__thumb {
    width: 5.25rem;
    height: 3.9375rem;
  }

  .article-featured__title {
    font-size: var(--fs-18, 1.125rem);
  }

  .article-featured__thumb {
    margin-bottom: 0.875rem;
  }

  .article-item__supervise {
    font-size: 0.4375rem;
    padding: 0.0625rem 0.25rem;
  }

  .cta {
    padding-block: 2.5rem;
  }

  .cta__banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }

  .cta__body {
    width: 100%;
  }

  .cta__label {
    margin-bottom: 0.125rem;
    font-size: 0.625rem;
    letter-spacing: 0.16em;
  }

  .cta__title {
    font-size: 0.9375rem;
    line-height: 1.45;
    margin-bottom: 0;
  }

  .cta__text {
    display: none;
  }

  .cta__btn {
    align-self: flex-start;
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
  }

  .cta .c-btn--white .icon {
    width: 0.75rem;
    height: 0.75rem;
  }

  .cta__image-banner {
    aspect-ratio: 5 / 1;
    border-radius: 0.75rem;
  }

  .cat-card {
    padding: 1.25rem;
  }

  .cat-card__top {
    flex-direction: column;
    gap: 0.75rem;
  }

  .footer {
    padding-top: 3.5rem;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .u-section-num {
    font-size: 7rem;
    opacity: 0.7;
  }
}
