/*
 * TCD cancel styles
 *
 * Theme-level overrides for pages that intentionally diverge from
 * the stock TCD page layout. Keep these separate from Tailwind build output.
 *
 * Rules here must ONLY cancel TCD theme defaults — no layout, no component styles.
 * Layout and component styles belong in assets/tw/app.css (Tailwind @layer components).
 */

body.tailwind-cancel-page .l-container,
body.tailwind-cancel-page .p-page,
body.tailwind-cancel-page .p-page-header,
body.tailwind-cancel-page .p-single-content,
body.tailwind-cancel-page .c-archive-header__content {
  width: 100%;
}

body.tailwind-cancel-page .l-container,
body.tailwind-cancel-page .l-contents,
body.tailwind-cancel-page .l-main {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.tailwind-cancel-page .l-contents {
  max-width: 100% !important;
  inline-size: 100% !important;
  width: 100% !important;
  gap: 0 !important;
}

body.tailwind-cancel-page .l-main {
  width: 100% !important;
  max-width: 100% !important;
  row-gap: 0 !important;
}

body.tailwind-cancel-page .p-single-content {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.tailwind-cancel-page.page_default_header .c-archive-header__copy {
  max-width: min(100% - 32px, 960px);
}

/* Strength page: cancel TCD font-family overrides */
.tw-strength-page h2,
.tw-strength-page h3,
.tw-strength-page p,
.tw-strength-page th,
.tw-strength-page td,
.tw-strength-page a,
.tw-technology-page h2,
.tw-technology-page h3,
.tw-technology-page p,
.tw-technology-page th,
.tw-technology-page td,
.tw-technology-page a,
.tw-products-page h2,
.tw-products-page h3,
.tw-products-page p,
.tw-products-page th,
.tw-products-page td,
.tw-products-page a {
  font-family: inherit;
}

@media (max-width: 991px) {
  .l-contents:has(.tw-strength-page),
  .l-contents:has(.tw-company-page),
  .l-contents:has(.tw-recruit-page),
  .l-contents:has(.tw-technology-page),
  .l-contents:has(.tw-products-page),
  .l-contents:has(.tw-news-archive),
  .l-contents:has(.tw-news-single) {
    inline-size: 100% !important;
  }

  .tw-strength-page.page_default_header .c-archive-header__copy {
    max-width: min(100% - 24px, 720px);
  }
}

@media (max-width: 767px) {
  .l-contents:has(.tw-strength-page),
  .l-contents:has(.tw-company-page),
  .l-contents:has(.tw-recruit-page),
  .l-contents:has(.tw-technology-page),
  .l-contents:has(.tw-products-page),
  .l-contents:has(.tw-news-archive),
  .l-contents:has(.tw-news-single) {
    padding-top: 0 !important;
  }

  .tw-strength-page.page_default_header .c-archive-header__copy {
    max-width: calc(100% - 24px);
  }
}

/* SP: transparent non-sticky header (page top) — sticky(72px)より縦幅広く・垂直センター */
@media (max-width: 991px) {
  [data-header-bar-transparent]:not(.is-pre-scroll-sticky):not(.is-scroll-sticky) .p-header-bar {
    height: 80px;
    align-items: center;
  }
}
