/* トップ、ヘルプ、問い合わせ、電子公告、/ec、認証完了、404 の見た目。
   このファイルはこれらのページでだけ読む(src/layouts/Base.astro)。
   値は tokens.css の --ap-*(Appleの実測)。お手本は ヘルプ=support.apple.com/ja-jp、問い合わせ=apple.com/jp/contact、
   電子公告=apple.com/jp/legal、404と認証完了=Appleの404ページ。トップは動きと構成を変えず、文字と余白だけを直す。 */

/* 字体。Webflow由来のCSSが要素ごとに字体を指定しているので、見出しと本文の両方を --font-sans に揃える */
:root:is([data-page="home"], [data-page="help-ja"], [data-page="help-en"], [data-page="chat-ja"], [data-page="chat-en"], [data-page="koukoku"], [data-page="ec"], [data-page="verification-complete"], [data-page="amazon-feedback"]) body,
:root:is([data-page="home"], [data-page="help-ja"], [data-page="help-en"], [data-page="chat-ja"], [data-page="chat-en"], [data-page="koukoku"], [data-page="ec"], [data-page="verification-complete"], [data-page="amazon-feedback"]) :is(h1, h2, h3, h4, h5, h6, p, a, div, span, li, strong, button):not(.gn *, .ln *, .gf *, [class*="w-icon"]),
:root[data-page="home"] .ln-title,
.utility-wrapper, .utility-wrapper * {
  font-family: var(--font-sans);
}

/* トップ */
:root[data-page="home"] .home-header-label,
:root[data-page="home"] .home-header-label strong {
  font-size: var(--ap-page-title);
  line-height: var(--ap-page-title-lh);
  letter-spacing: var(--ap-page-title-ls);
  font-weight: var(--ap-title-weight);
}
:root[data-page="home"] :is(.home-title-2, .home-title-3) {
  font-size: var(--ap-headline);
  line-height: var(--ap-headline-lh);
  letter-spacing: var(--ap-headline-ls);
  font-weight: var(--ap-title-weight);
}
:root[data-page="home"] .text-block-255 {
  font-size: var(--ap-body);
  line-height: var(--ap-body-lh);
  letter-spacing: var(--ap-body-ls);
  color: var(--ap-label-2);
}
:root[data-page="home"] .bento-initem-description {
  font-size: var(--ap-card-body);
  line-height: var(--ap-card-body-lh);
  letter-spacing: var(--ap-card-body-ls);
}
:root[data-page="home"] :is(.text-block-262, .text-block-262-copy) { font-weight: var(--ap-title-weight); }
:root[data-page="home"] .ease-faq-answer { font-size: var(--ap-body); line-height: var(--ap-body-lh); }

/* ヘルプ */
:root:is([data-page="help-ja"], [data-page="help-en"]) .section-76,
:root:is([data-page="help-ja"], [data-page="help-en"]) .section-77 {
  box-sizing: border-box;
  width: min(100%, calc(var(--ap-text) + 48px));
  max-width: none;
  margin-inline: auto;
  padding-inline: 24px;
}
:root:is([data-page="help-ja"], [data-page="help-en"]) .section-76 { padding-top: 64px; padding-bottom: 0; }
:root:is([data-page="help-ja"], [data-page="help-en"]) .section-77 { padding-top: var(--ap-section-y); padding-bottom: var(--ap-section-y); }
:root:is([data-page="help-ja"], [data-page="help-en"]) .heading-523 {
  margin: 0 0 56px;
  text-align: center;
  color: var(--ap-label-1);
  font-size: var(--ap-section-title);
  line-height: var(--ap-section-title-lh);
  letter-spacing: var(--ap-section-title-ls);
  font-weight: var(--ap-title-weight);
}
:root:is([data-page="help-ja"], [data-page="help-en"]) .div-block-790 { width: 100%; max-width: none; }
:root:is([data-page="help-ja"], [data-page="help-en"]) :is(.div-block-787, .faq-type-wrapper, .email-type-wrapper) {
  box-sizing: border-box;
  border: 0;
  border-radius: var(--ap-radius-card);
  background: var(--ap-fill-2);
  padding: 32px;
  color: var(--ap-label-1);
  transition: transform 0.3s cubic-bezier(0, 0, 0.5, 1);
}
:root:is([data-page="help-ja"], [data-page="help-en"]) .div-block-787 { margin-bottom: 20px; }
:root:is([data-page="help-ja"], [data-page="help-en"]) .div-block-791 { gap: 20px; }
:root:is([data-page="help-ja"], [data-page="help-en"]) .div-block-794 { display: none; }
:root:is([data-page="help-ja"], [data-page="help-en"]) .text-block-242 {
  color: var(--ap-label-1);
  font-size: var(--ap-eyebrow);
  line-height: var(--ap-eyebrow-lh);
  font-weight: var(--ap-title-weight);
}
:root:is([data-page="help-ja"], [data-page="help-en"]) :is(.text-block-243, .text-block-248) {
  margin-top: 8px;
  color: var(--ap-label-2);
  font-size: var(--ap-body);
  line-height: var(--ap-body-lh);
}
:root:is([data-page="help-ja"], [data-page="help-en"]) .div-block-795 { width: 100%; max-width: none; }
:root:is([data-page="help-ja"], [data-page="help-en"]) .text-block-242-copy {
  color: var(--ap-label-1);
  font-size: var(--ap-headline);
  line-height: var(--ap-headline-lh);
  letter-spacing: var(--ap-headline-ls);
  font-weight: var(--ap-title-weight);
}
:root:is([data-page="help-ja"], [data-page="help-en"]) .faq-tab-button { min-height: 44px; }
:root:is([data-page="help-ja"], [data-page="help-en"]) :is(.text-block-244, .text-block-245) { font-size: var(--ap-body); line-height: var(--ap-body-lh); }
:root:is([data-page="help-ja"], [data-page="help-en"]) .link-block-128 { text-decoration: none; color: var(--ap-label-1); }
:root:is([data-page="help-ja"], [data-page="help-en"]) .text-block-246 {
  text-decoration: none;
  color: var(--ap-label-1);
  font-size: 19px;
  line-height: 24px;
  font-weight: var(--ap-title-weight);
}
:root:is([data-page="help-ja"], [data-page="help-en"]) .link-block-128:hover .text-block-246 { color: var(--ap-link); }
/* Webflowの固定の高さだと行の途中で切れるので、2行で省略する */
:root:is([data-page="help-ja"], [data-page="help-en"]) .text-block-247 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  height: auto;
  max-height: none;
  color: var(--ap-label-2);
  font-size: var(--ap-body);
  line-height: var(--ap-body-lh);
}
:root:is([data-page="help-ja"], [data-page="help-en"]) :is(.link-block-128, .collection-item) { height: auto; max-height: none; }
@media (hover: hover) {
  :root:is([data-page="help-ja"], [data-page="help-en"]) :is(.div-block-787, .faq-type-wrapper, .email-type-wrapper):hover { transform: scale(1.01); }
}
@media (max-width: 734px) {
  :root:is([data-page="help-ja"], [data-page="help-en"]) .section-76 { padding-top: 40px; }
  /* Appleのサポートはスマホで 40/47。--ap-section-title の 32 では小さい */
  :root:is([data-page="help-ja"], [data-page="help-en"]) .heading-523 { margin-bottom: 40px; font-size: 40px; line-height: 47px; }
  :root:is([data-page="help-ja"], [data-page="help-en"]) :is(.div-block-787, .faq-type-wrapper, .email-type-wrapper) { padding: 24px; }
  :root:is([data-page="help-ja"], [data-page="help-en"]) .text-block-246 { font-size: 17px; line-height: 23px; }
}

/* 問い合わせ */
:root:is([data-page="chat-ja"], [data-page="chat-en"]) .section-13 { padding: 64px 24px var(--ap-section-y); }
:root:is([data-page="chat-ja"], [data-page="chat-en"]) .container-12 { width: min(100%, var(--ap-text)); max-width: none; margin-inline: auto; padding: 0; }
:root:is([data-page="chat-ja"], [data-page="chat-en"]) .heading-521 {
  margin: 0 0 64px;
  text-align: center;
  color: var(--ap-label-1);
  font-size: var(--ap-section-title);
  line-height: var(--ap-section-title-lh);
  letter-spacing: var(--ap-section-title-ls);
  font-weight: var(--ap-title-weight);
}
:root:is([data-page="chat-ja"], [data-page="chat-en"]) .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
:root:is([data-page="chat-ja"], [data-page="chat-en"]) :is(.link-block-8, .link-block-8-copy, .link-block-8-copy-copy) {
  box-sizing: border-box;
  align-items: center;
  gap: 20px;
  min-height: 112px;
  padding: 24px 32px;
  border-radius: var(--ap-radius-card);
  background: var(--ap-fill-2);
  color: var(--ap-label-1);
  text-decoration: none;
}
:root:is([data-page="chat-ja"], [data-page="chat-en"]) .image-400 { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
:root:is([data-page="chat-ja"], [data-page="chat-en"]) .text-block-236 {
  color: var(--ap-label-1);
  font-size: var(--ap-label);
  line-height: var(--ap-label-lh);
  font-weight: var(--ap-title-weight);
}
@media (max-width: 734px) {
  :root:is([data-page="chat-ja"], [data-page="chat-en"]) .section-13 { padding-top: 40px; }
  :root:is([data-page="chat-ja"], [data-page="chat-en"]) .heading-521 { margin-bottom: 40px; font-size: 40px; line-height: 47px; }
  :root:is([data-page="chat-ja"], [data-page="chat-en"]) .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

/* 電子公告。AppleのLegalと同じ小さめの見出し(40/47、スマホ 28/33) */
:root[data-page="koukoku"] .koukoku { padding: 96px 24px var(--ap-section-y); }
:root[data-page="koukoku"] .div-block-888 { width: min(100%, var(--ap-text)); margin-inline: auto; text-align: center; }
:root[data-page="koukoku"] .page-title-sub {
  margin: 0 0 8px;
  color: var(--ap-link);
  font-size: 19px;
  line-height: 24px;
  font-weight: 400;
}
:root[data-page="koukoku"] .page-title {
  margin: 0;
  color: var(--ap-label-1);
  font-size: 40px;
  line-height: 47px;
  font-weight: var(--ap-title-weight);
}
@media (max-width: 734px) {
  :root[data-page="koukoku"] .koukoku { padding-top: 64px; }
  :root[data-page="koukoku"] .page-title { font-size: 28px; line-height: 33px; }
}

/* /ec。文言と main.js が使うクラスは変えず、文字だけを揃える */
:root[data-page="ec"] :is(.heading-531, .text-block-288, .ec-step-title, .text-block-296, .text-block-327) { font-weight: var(--ap-title-weight); }
:root[data-page="ec"] :is(.text-block-326, .text-block-328) { font-size: var(--ap-body); line-height: var(--ap-body-lh); }
:root[data-page="ec"] .tab-button-text { font-size: 14px; }
:root[data-page="ec"] :is(.tab-link-tab-3, .button-7, .button-8) { min-height: 44px; }

/* 認証完了 */
:root[data-page="verification-complete"] .section-87 {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 100svh;
  padding: 24px;
}
:root[data-page="verification-complete"] .image-467 { width: 96px; height: 96px; margin: 0; }
:root[data-page="verification-complete"] .text-block-314 {
  text-align: center;
  color: var(--ap-label-1);
  font-size: var(--ap-eyebrow);
  line-height: var(--ap-eyebrow-lh);
  font-weight: var(--ap-title-weight);
}

/* 404。Appleの404と同じ中央揃え(48/55) */
.utility-wrapper {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  min-height: 100svh;
  padding: 136px 24px 96px;
  text-align: center;
}
.utility-wrapper .utility-container { display: block; width: min(100%, var(--ap-text)); max-width: none; }
.utility-wrapper .text-mono { margin-bottom: 8px; color: var(--ap-label-2); font-size: var(--ap-hint); line-height: var(--ap-hint-lh); }
.utility-wrapper h1 {
  margin: 0;
  color: var(--ap-label-1);
  font-size: var(--ap-headline);
  line-height: var(--ap-headline-lh);
  letter-spacing: var(--ap-headline-ls);
  font-weight: var(--ap-title-weight);
}
.utility-wrapper p { margin: 16px 0 0; color: var(--ap-label-2); font-size: var(--ap-body); line-height: var(--ap-body-lh); }

/* トップのスマホ。48px のままだと「190カ国で使える」の最後の1字が折り返すので、幅に合わせて縮める */
:root[data-page="home"] :is(.home-title-2, .home-title-3) { text-wrap: balance; }
@media (max-width: 734px) {
  :root[data-page="home"] .home-header-label,
  :root[data-page="home"] .home-header-label strong { font-size: min(var(--ap-page-title), 11.6vw); line-height: 1.145; }
}
:root[data-page="home"] .free-return-bento-label { font-weight: var(--ap-title-weight); text-wrap: balance; }
@media (max-width: 734px) {
  /* 「無料返品保証付き」の最後の1字が折り返さない大きさにする */
  :root[data-page="home"] .free-return-bento-label { font-size: min(var(--ap-section-title), 8.2vw); line-height: 1.2; }
}
