/* ===================================================
   GETA LABO 診断アプリ — balancetec.co.jp トンマナ準拠
=================================================== */

:root {
    --bg:          #FAFAFA;
    --bg-section:  #F0F0F0;
    --white:       #fff;
    --ink:         #1a1a1a;
    --gold:        #333333;
    --gold-hover:  rgba(0, 0, 0, 0.04);
    --red:         #C0392B;
    --red-hover:   #A93226;
    --gray-mid:    #666;
    --gray-light:  #999;
    --border:      rgba(0, 0, 0, 0.09);
    --shadow:      0 4px 40px rgba(0, 0, 0, 0.07), 0 1px 6px rgba(0, 0, 0, 0.04);
}

/* ── リセット ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── ページ背景（ブランドサイトと同一） ── */
body {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "メイリオ", sans-serif;
    background-color: var(--bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23w)' opacity='0.03'/%3E%3C/svg%3E");
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    line-height: 1.8;
    letter-spacing: 0.04em;
    -webkit-font-smoothing: antialiased;
}

/* ── コンテナ ── */
.container {
    max-width: 600px;
    width: 100%;
    background: var(--white);
    border-radius: 0;
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 520px;
}

/* ゴールドトップライン */
.container::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--gold);
}

/* ── 画面管理 ── */
.screen {
    display: none;
    opacity: 0;
    min-height: 517px;
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
    opacity: 1;
}

.content {
    padding: 52px 48px;
    text-align: center;
    width: 100%;
}

/* ===================================================
   トップアイコン
=================================================== */
.top-icon {
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* ===================================================
   タイポグラフィ（ブランドサイト準拠）
=================================================== */

/* 英字ラベル — ブランドの "01 理念" 形式に準拠 */
.en-label {
    font-family: "Noto Serif JP", serif;
    font-size: 0.62rem;
    letter-spacing: 0.25em;
    color: var(--gold);
    margin-bottom: 12px;
    font-weight: 300;
}

/* メインタイトル */
.main-title {
    font-family: "Noto Serif JP", serif;
    font-size: 2.5rem;
    color: var(--ink);
    letter-spacing: 0.18em;
    font-weight: 500;
    margin-bottom: 24px;
    line-height: 1.2;
}

/* 金線区切り */
.deco-divider {
    width: 32px;
    height: 1px;
    background: var(--gold);
    margin: 0 auto 24px;
}

/* サブタイトル */
.subtitle {
    font-size: 0.9rem;
    color: var(--gray-mid);
    margin-bottom: 20px;
    letter-spacing: 0.06em;
    font-weight: 300;
}

/* 説明文 */
.description {
    font-size: 0.9rem;
    color: var(--gray-mid);
    margin-bottom: 44px;
    line-height: 2.1;
    font-weight: 300;
}

/* ===================================================
   ボタン（ブランドの shop-btn スタイルに準拠）
=================================================== */
.btn {
    display: inline-block;
    padding: 14px 48px;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Noto Serif JP", serif;
    font-weight: 400;
    letter-spacing: 0.12em;
    border-radius: 0;
    line-height: 1;
}

/* プライマリ — レッド（メインCTA） */
.btn-primary {
    background: var(--red);
    color: var(--white);
    border: 1px solid var(--red);
}

.btn-primary:hover {
    background: var(--red-hover);
    border-color: var(--red-hover);
    color: var(--white);
}

.btn-primary:active {
    transform: scale(0.99);
}

/* セカンダリ — ゴールドアウトライン（shop-btn 準拠） */
.btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--gold);
    margin-top: 12px;
}

.btn-secondary:hover {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

/* ターシャリ — テキストリンク風 */
.btn-tertiary {
    background: transparent;
    color: var(--gray-light);
    border: 1px solid var(--border);
    margin-top: 16px;
    font-size: 0.8rem;
    padding: 10px 28px;
    font-family: "Noto Sans JP", sans-serif;
}

.btn-tertiary:hover {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

.btn-view-product {
    margin-top: 20px;
    width: 100%;
    max-width: 280px;
}

/* ===================================================
   プログレスバー
=================================================== */
.progress-container {
    padding: 18px 48px;
    background: var(--bg-section);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.progress-track {
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--gold);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.progress-text {
    font-family: "Noto Serif JP", serif;
    font-size: 0.72rem;
    color: var(--gold);
    text-align: right;
    letter-spacing: 0.12em;
    font-weight: 300;
}

/* ===================================================
   質問画面
=================================================== */
.question-text {
    font-family: "Noto Serif JP", serif;
    font-size: 1.2rem;
    color: var(--ink);
    margin-bottom: 36px;
    line-height: 2;
    font-weight: 400;
    letter-spacing: 0.08em;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 選択肢ボタン（shop-btn スタイル準拠） */
.option-btn {
    padding: 16px 20px;
    font-size: 0.88rem;
    background: var(--white);
    color: var(--ink);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Noto Serif JP", serif;
    font-weight: 300;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: 0.04em;
    line-height: 1.7;
    border-radius: 0;
}

.option-btn::before {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    min-width: 4px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease;
}

.option-btn:hover {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

.option-btn:hover::before {
    background: var(--white);
}

.option-btn:active {
    transform: scale(0.995);
}

/* ===================================================
   結果画面
=================================================== */
.result-title {
    font-family: "Noto Serif JP", serif;
    font-size: 1.6rem;
    color: var(--ink);
    letter-spacing: 0.15em;
    font-weight: 500;
    margin-bottom: 20px;
}

.result-category-label {
    font-family: "Noto Serif JP", serif;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 8px;
    font-weight: 300;
}

.result-card {
    background: var(--bg-section);
    border: none;
    border-left: 2px solid var(--gold);
    padding: 32px 28px;
    margin-bottom: 8px;
    animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.geta-name {
    font-family: "Noto Serif JP", serif;
    font-size: 1.2rem;
    color: var(--ink);
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.geta-description {
    font-size: 0.85rem;
    color: var(--gray-mid);
    margin-bottom: 20px;
    line-height: 1.9;
    font-weight: 300;
}

/* ===================================================
   商品カード
=================================================== */
.product-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.product-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 18px 20px;
    text-align: left;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.product-card:first-child {
    border-color: var(--gold);
}

.product-card:hover {
    border-color: var(--gold);
    box-shadow: 0 2px 16px rgba(184, 134, 11, 0.1);
}

.product-rank {
    display: inline-block;
    padding: 2px 10px;
    font-family: "Noto Serif JP", serif;
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    margin-bottom: 10px;
    background: var(--bg-section);
    color: var(--gray-mid);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.product-card:first-child .product-rank {
    background: var(--ink);
    color: #ffffff;
    border-color: var(--ink);
}

.product-name {
    font-family: "Noto Serif JP", serif;
    font-size: 0.98rem;
    color: var(--ink);
    margin-bottom: 4px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.product-price {
    font-family: "Noto Serif JP", serif;
    font-size: 0.9rem;
    color: var(--gold);
    font-weight: 500;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.product-desc {
    font-size: 0.82rem;
    color: var(--gray-mid);
    margin-bottom: 14px;
    line-height: 1.7;
    font-weight: 300;
}

/* 商品リンク（shop-btn 準拠） */
.product-link {
    display: inline-block;
    padding: 7px 18px;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid var(--gold);
    font-family: "Noto Serif JP", serif;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.product-link:hover {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

/* ===================================================
   カテゴリリンクセクション
=================================================== */
.category-link-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    text-align: center;
}

.category-link-text {
    font-size: 0.8rem;
    color: var(--gray-light);
    margin-bottom: 12px;
    letter-spacing: 0.04em;
    font-weight: 300;
}

.btn-category {
    margin-top: 0;
    padding: 10px 28px;
    font-size: 0.82rem;
}

/* ===================================================
   フェードアニメーション
=================================================== */
.fade-out .content {
    animation: fadeOut 0.25s ease forwards;
}

.fade-in .content {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-8px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================================================
   レスポンシブ
=================================================== */
@media (max-width: 768px) {
    body {
        padding: 0;
        align-items: flex-start;
    }

    .container {
        min-height: 100vh;
        box-shadow: none;
    }

    .content {
        padding: 40px 28px;
    }

    .progress-container {
        padding: 16px 28px;
    }

    .main-title {
        font-size: 2rem;
    }

    .question-text {
        font-size: 1.08rem;
    }

    .result-card {
        padding: 28px 20px;
    }

    .btn {
        padding: 13px 36px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.75rem;
    }

    .content {
        padding: 36px 20px;
    }

    .top-icon-img {
        width: 64px;
        height: 64px;
    }

    .description {
        font-size: 0.86rem;
    }

    .option-btn {
        font-size: 0.85rem;
        padding: 14px 16px;
    }
}
