/* This stylesheet is linked only by the Nov25 apparel Instagram guide. */
body:has(#apparel-plan) .apparel-instagram-figure::before {
  content: none !important;
  display: none !important;
}
body:has(#apparel-plan) .apparel-instagram-figure :is(img, svg) {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 480px !important;
  height: auto;
  margin-inline: auto;
}
body:has(#apparel-plan) :is(.apparel-instagram-figure, .apparel-instagram-photo) figcaption {
  color: #4b5563 !important;
  opacity: 1 !important;
  font-size: 14px !important;
  line-height: 1.8;
}
body:has(#apparel-plan) .apparel-instagram-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
body:has(#apparel-plan) .prose-article strong {
  font-weight: 700;
  color: #243d30;
}
body:has(#apparel-plan) .article-header h1 {
  font-size: clamp(22px, 3vw, 32px) !important;
  letter-spacing: 0.015em !important;
  text-wrap: balance;
}
body:has(#apparel-plan) .prose-article :is(h2, h3),
body:has(#apparel-plan) .mid-article-cta p,
body:has(#apparel-plan) .article-bottom-cta--four a,
body:has(#apparel-plan) .author-title {
  text-wrap: balance;
}
body:has(#apparel-plan) .article-bottom-cta--four {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto repeat(2, minmax(56px, 1fr)) !important;
  gap: 10px;
}
body:has(#apparel-plan) .article-bottom-cta--four > p {
  grid-column: 1 / -1;
  margin: 0 !important;
}
body:has(#apparel-plan) .article-bottom-cta--four > p:last-of-type {
  margin-bottom: 12px !important;
}
body:has(#apparel-plan) .article-bottom-cta--four > div {
  display: contents !important;
}
body:has(#apparel-plan) .article-bottom-cta--four a {
  width: 100%;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 12px 8px !important;
  font-size: 13px !important;
  line-height: 1.6;
  white-space: normal !important;
}
body:has(#apparel-plan) :is(.author-card-label, .author-role, .author-title, .article-byline p) {
  font-size: 12px !important;
  color: #4b5563 !important;
}
body:has(#apparel-plan) .author-bio {
  color: #4b5563 !important;
}
body:has(#apparel-plan) .article-sidebar-cta a[href^="/contact/"] {
  background: #a55d20 !important;
  color: #fff !important;
}
body:has(#apparel-plan) .article-sidebar-cta a[href^="/contact/"]:hover {
  background: #8b4816 !important;
}
body:has(#apparel-plan) .article-sidebar-cta a[href^="/downloads/"] {
  color: #fff !important;
}
/* Apply the previously checked metadata/sidebar readability fix to this route. */
body:has(#apparel-plan) :is(
  .article-meta-bar,
  .article-meta-bar span,
  .sidebar-widget-label,
  .sidebar-toc-link:not(.is-active),
  .article-sidebar .text-num,
  .article-sidebar .text-gray-400,
  .article-sidebar .text-gray-400 a,
  .article-related-cases .text-en,
  .article-related .text-en
) {
  color: #4b5563 !important;
  opacity: 1 !important;
}
body:has(#apparel-plan) :is(
  .sidebar-widget-label,
  [class*="text-[10px]"],
  [class*="text-[11px]"],
  [style*="font-size:10px"],
  [style*="font-size:11px"],
  [style*="font-size: 10px"],
  [style*="font-size: 11px"]
) { font-size: 12px !important; }
body:has(#apparel-plan) .apparel-instagram-table-hint { display: none; }
@media (max-width: 640px) {
  body:has(#apparel-plan) .article-top-cta-actions a {
    letter-spacing: 0;
    white-space: nowrap;
  }
  body:has(#apparel-plan) .apparel-instagram-table-hint {
    display: block;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.7;
  }
  body:has(#apparel-plan) .prose-article :is(th, td) {
    box-sizing: border-box;
    min-width: 144px;
    width: 144px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body:has(#apparel-plan) .prose-article :is(th, td):first-child {
    min-width: 112px;
    width: 112px;
    max-width: 112px;
  }
  body:has(#apparel-plan) .prose-article thead th:first-child {
    background: #f3eee5;
  }
  body:has(#apparel-plan) .author-card { padding: 20px !important; }
  body:has(#apparel-plan) .author-card > .flex > .flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  body:has(#apparel-plan) .author-card > .flex > .flex > div:last-child { width: 100%; }
}

body:has(#apparel-plan) .article-related h3 { text-wrap: balance; }

/* Keep the dark footer legible on this article, including consent/privacy copy.
   Existing layout, wording and all other routes are unchanged. */
body:has(#apparel-plan) footer [class*="text-white/"],
body:has(#apparel-plan) footer p.text-en {
  color: rgba(255, 255, 255, 0.9) !important;
}
body:has(#apparel-plan) footer a[class*="text-white/"]:is(:hover, :focus-visible) {
  color: #fff !important;
}

/* Keep the related-service description together at native sidebar widths. */
body:has(#apparel-plan) .article-sidebar a[href*="cta=sidebar-related-service"] p.text-gray-600 {
  text-wrap: balance;
  line-break: strict;
  word-break: normal;
}
/* All visible placeholder text is audited separately from DOM text nodes. */
body:has(#apparel-plan) footer :is(input, textarea)::placeholder {
  color: rgba(255, 255, 255, 0.9) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.9) !important;
  opacity: 1 !important;
}
body:has(#apparel-plan) .article-sidebar-newsletter :is(input, textarea)::placeholder {
  color: #4b5563 !important;
  -webkit-text-fill-color: #4b5563 !important;
  opacity: 1 !important;
}

/* Breadcrumb text and separators are part of the current article readability check. */
body:has(#apparel-plan) nav[aria-label="パンくずリスト"],
body:has(#apparel-plan) nav[aria-label="パンくずリスト"] :is(a, span) {
  color: #4b5563 !important;
  opacity: 1 !important;
}

/* The open mobile menu stays above the article's fixed CTA and below the header. */
body:has(#apparel-plan) #mobile-menu { z-index: 45; }

/* Balance the expanded mobile and sidebar contents without shrinking text. */
body:has(#apparel-plan) :is(.article-toc li, .sidebar-toc-link) {
  text-wrap: balance;
}

/* Keep Japanese long vowels and punctuation off a new heading/contents line. */
body:has(#apparel-plan) .prose-article :is(h2, h3),
body:has(#apparel-plan) :is(.article-toc li, .sidebar-toc-link) {
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
}

/* Sidebar recommendations show the complete reviewed title above its date. */
body:has(#apparel-plan) .article-sidebar a[href^="/media/columns/"] p.line-clamp-2 {
  display: block !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
  max-height: none !important;
  text-wrap: balance;
}

/* Japanese table labels respect prohibited line starts, including long vowels. */
body:has(#apparel-plan) .prose-article :is(th, td) {
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
}

/* The demo anchor stays clear of the fixed header after both real navigation and in-page scrolling. */
#apparel-plan { scroll-margin-top: 110px; }
/* A two-colour focus indicator stays distinct on white, green and dark surfaces. */
body:has(#apparel-plan) :is(.article-bottom-cta--four, .article-sidebar-cta, footer) a:focus-visible {
  outline: 3px solid #fff !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px #173625 !important;
}

/* Include the naturally opened service dialog in this article's readability checks. */
body:has(#apparel-plan) .seo-media-popup__label {
  color: #305541 !important;
  font-size: 12px !important;
}
body:has(#apparel-plan) .seo-media-popup__desc {
  color: #4b5563 !important;
  font-size: 14px !important;
}
body:has(#apparel-plan) .seo-media-popup__note { font-size: 12px !important; }
body:has(#apparel-plan) .seo-media-popup__btn {
  background: #305541 !important;
  color: #fff !important;
}
body:has(#apparel-plan) .seo-media-popup__btn:hover { background: #244331 !important; }
body:has(#apparel-plan) .seo-media-popup :is(a, button):focus-visible {
  outline: 3px solid #fff !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px #173625 !important;
}
body:has(#apparel-plan) .seo-media-popup__close { color: #4b5563 !important; }

/* Preserve the reviewed article's short meaningful title/heading phrases. */
body:has(#apparel-plan) .article-header h1 .article-title-part,
body:has(#apparel-plan) .prose-article .apparel-instagram-term {
  display: inline-block;
  white-space: nowrap;
  max-width: none;
  vertical-align: baseline;
}

/* The pillar link keeps full text contrast while its parent is hovered. */
body:has(#apparel-plan) .article-pillar .group-hover\:opacity-70 {
  opacity: 1 !important;
}
