/* =====================================================
 * FAQページ（page-faq.php、2026-09-20 作り替え）
 *
 * 畔栁さんが5案から「4 タブで切り替える」を選んだ（見本 ops/design/faq-redesign-preview.html）。
 *   見出し → 説明・検索・件数 → カテゴリーのタブ → 選んだカテゴリーの質問（左に名前と件数、右に質問）
 *   → 解決しないときの案内
 * 色・書体・部品はサイト共通（common.css の :root、.futura、丸いボタン .pillButton）。
 * 動き（タブ・開閉・検索）は assets/js/faq.js。スクリプトが動かないときは、全カテゴリーの質問と回答がそのまま並ぶ。
 * 旧：灰色の丸いリンクで絞り込み、質問は白いカードで縦に64問並べていた
 * ===================================================== */

.wrapTitlePage .titleEn,
.wrapTitlePage .titleJp {
    color: #000000;
}

.areaFaq {
    padding: clamp(56px, 6vw, 88px) 0 clamp(80px, 9vw, 128px);
}

.areaFaq .inner {
    max-width: 1200px;
}

/* ---------- 見出し・説明・検索・件数 ---------- */
.faqHead {
    text-align: center;
}

.faqTitle {
    font-size: clamp(26px, 2.8vw, 36px);
    font-weight: normal;
    letter-spacing: .06em;
}

.faqSub {
    max-width: 680px;
    margin: 14px auto 0;
    font-size: 14.5px;
    font-weight: 300;
    line-height: 2;
    color: #555;
    word-break: auto-phrase;
}

.faqSearch {
    max-width: 560px;
    margin: clamp(24px, 3vw, 36px) auto 0;
}

.faqSearchBox {
    position: relative;
    display: flex;
    align-items: center;
}

.faqSearchBox svg {
    position: absolute;
    left: 20px;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #8A8A93;
    stroke-width: 1.8;
    pointer-events: none;
}

.faqSearchBox input {
    width: 100%;
    height: 56px;
    padding: 0 20px 0 50px;
    border: 1px solid #D6D6DC;
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    color: inherit;
    outline: none;
    transition: border-color .3s, box-shadow .3s;
    -webkit-appearance: none;
    appearance: none;
}

.faqSearchBox input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 165, 81, .15);
}

.faqMeta {
    margin-top: 14px;
    font-size: 13px;
    color: #6A6A72;
}

/* ---------- カテゴリーのタブ ---------- */
.faqTabs {
    display: flex;
    margin-top: clamp(36px, 4vw, 56px);
    border-bottom: 1px solid #E3E3E6;
    overflow-x: auto;
    scrollbar-width: none;
}

.faqTabs::-webkit-scrollbar {
    display: none;
}

.faqTab {
    position: relative;
    flex: 1 0 auto;
    padding: 16px 20px 18px;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 14px;
    color: #777;
    white-space: nowrap;
    cursor: pointer;
    transition: color .3s;
}

.faqTab::after {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: -1px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s cubic-bezier(.22, .61, .36, 1);
}

.faqTabEn {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    letter-spacing: .24em;
    color: #A0A0A8;
    transition: color .3s;
}

.faqTabCount {
    margin-left: 8px;
    font-size: 12px;
    color: #A0A0A8;
}

.faqTab[aria-selected="true"] {
    color: #292929;
    font-weight: 500;
}

.faqTab[aria-selected="true"]::after {
    transform: none;
}

.faqTab[aria-selected="true"] .faqTabEn {
    color: var(--gold);
}

.faqTab:hover {
    color: #292929;
}

.faqTab:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -4px;
}

/* 検索中は、カテゴリーのタブの選択を薄くする（結果は全カテゴリーから出すため） */
.areaFaq.is-searching .faqTab[aria-selected="true"] {
    color: #777;
    font-weight: normal;
}

.areaFaq.is-searching .faqTab[aria-selected="true"]::after {
    transform: scaleX(0);
}

.areaFaq.is-searching .faqTab[aria-selected="true"] .faqTabEn {
    color: #A0A0A8;
}

/* 検索中は、前後のカテゴリーへの矢印を出さない（結果は複数のカテゴリーにまたがるため） */
.areaFaq.is-searching .faqPanelNav {
    display: none;
}

/* ---------- 検索の結果の件数 ---------- */
.faqResult {
    margin-top: 24px;
    font-size: 14px;
    color: #555;
}

.faqResult:empty {
    display: none;
}

.faqResult b {
    font-weight: 500;
}

/* ---------- カテゴリーの中身 ---------- */
.faqPanel {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 60px;
    margin-top: clamp(36px, 4vw, 56px);
}

.faqPanel[hidden] {
    display: none;
}

.faqPanelEn {
    font-size: clamp(38px, 4.4vw, 56px);
    line-height: 1;
    color: #222;
}

.faqPanelName {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 500;
}

.faqPanelCount {
    margin-top: 8px;
    font-size: 13px;
    color: #6A6A72;
}

.faqPanelNav {
    display: flex;
    gap: 10px;
    margin-top: 28px;
}

.faqPanelNav button {
    width: 44px;
    height: 44px;
    border: 1px solid #D6D6DC;
    border-radius: 50%;
    background: #fff;
    font-family: inherit;
    font-size: 16px;
    color: inherit;
    cursor: pointer;
    transition: background-color .3s, border-color .3s, color .3s;
}

.faqPanelNav button:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

/* ---------- 質問と回答 ---------- */
.faqQa {
    border-top: 1px solid #E3E3E6;
}

.faqQa:last-child {
    border-bottom: 1px solid #E3E3E6;
}

.faqQa[hidden] {
    display: none;
}

.faqQaQ {
    margin: 0;
    font-size: inherit;
    font-weight: normal;
}

.faqQaQ button {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    padding: 22px 0;
    border: 0;
    background: none;
    font-family: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.faqMark {
    flex: none;
    width: 26px;
    font-size: 20px;
    line-height: 1.35;
    color: #A8812F;
}

.faqQaText {
    flex: 1;
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1.75;
    letter-spacing: .02em;
    word-break: auto-phrase;
}

.faqQaIcon {
    position: relative;
    flex: none;
    width: 28px;
    height: 28px;
    margin-top: 1px;
    border: 1px solid #D6D6DC;
    border-radius: 50%;
    transition: border-color .3s, background-color .3s, color .3s;
}

.faqQaIcon::before,
.faqQaIcon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 1px;
    margin: -.5px 0 0 -5px;
    background: currentColor;
    transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}

.faqQaIcon::after {
    transform: rotate(90deg);
}

.faqQaQ button:hover .faqQaIcon {
    border-color: var(--ink);
}

.faqQaQ button[aria-expanded="true"] .faqQaIcon {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.faqQaQ button[aria-expanded="true"] .faqQaIcon::after {
    transform: rotate(0);
}

/* 回答は高さを 0fr → 1fr で開く（中身の高さを測らずに滑らかに開く） */
.faqQaA {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .45s cubic-bezier(.22, .61, .36, 1);
}

.faqQa.is-open .faqQaA {
    grid-template-rows: 1fr;
}

.faqQaA > div {
    overflow: hidden;
}

.faqQaAIn {
    display: flex;
    gap: 16px;
    padding: 0 44px 26px 0;
}

.faqQaAIn .faqMark {
    color: #9A9AA3;
}

.faqQaAText {
    flex: 1;
    margin: 0;
    font-size: 14.5px;
    font-weight: 300;
    line-height: 2;
    color: #444;
}

.faqQaText mark,
.faqQaAText mark {
    padding: 0 1px;
    border-radius: 2px;
    background: rgba(232, 211, 154, .55);
    color: inherit;
}

/* 見つからなかったとき */
.faqEmpty {
    padding: 48px 0;
    font-size: 14.5px;
    color: #6A6A72;
    text-align: center;
}

/* ---------- 解決しないときの案内 ---------- */
.faqHelp {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px 40px;
    margin-top: clamp(56px, 6vw, 88px);
    padding: clamp(28px, 3.4vw, 44px) clamp(24px, 3.4vw, 48px);
    border: 1px solid #E3E3E6;
    border-radius: 12px;
}

.faqHelpEn {
    font-size: 13px;
    letter-spacing: .3em;
    color: #A8812F;
}

.faqHelpTitle {
    margin-top: 10px;
    font-size: clamp(18px, 1.9vw, 22px);
    font-weight: 500;
}

.faqHelpText {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.9;
    color: #555;
    word-break: auto-phrase;
}

.faqHelp .pillButton {
    margin: 0;
}

/* ---------- スマホ ---------- */
@media screen and (max-width: 900px) {
    .faqPanel {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .faqPanelEn {
        font-size: 34px;
    }

    .faqPanelNav {
        margin-top: 20px;
    }

    .faqHelp {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media screen and (max-width: 560px) {
    .faqTab {
        padding: 14px 16px 16px;
        font-size: 13px;
    }

    .faqTab::after {
        left: 16px;
        right: 16px;
    }

    .faqSearchBox input {
        height: 52px;
        font-size: 14px;
    }

    .faqQaText {
        font-size: 14.5px;
    }

    .faqQaAIn {
        padding-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .faqQaA,
    .faqQaIcon,
    .faqQaIcon::before,
    .faqQaIcon::after,
    .faqTab::after {
        transition: none;
    }
}
