/* ===================================================
   GETA LABO 下駄診断 — HP（和モダン）トンマナ準拠
   テーマ:「歩みが楽しくなる診断」
   生成りホワイト × 金色 × 丸みのあるやわらか可愛いUI
=================================================== */

:root {
    /* HP本体と共通のパレット */
    --washi:       #FAF8F5;   /* 生成りホワイト（HP背景と同一） */
    --cream:       #F5F0EB;   /* クリーム（HPセクション背景と同一） */
    --white:       #ffffff;
    --ink:         #1a1a1a;
    --ink-warm:    #3a3228;
    --gold:        #B8860B;
    --gold-deep:   #96690a;
    --gold-soft:   rgba(184, 134, 11, 0.10);
    --gold-line:   rgba(184, 134, 11, 0.35);
    --gray-mid:    #666;
    --gray-warm:   #8a7a6a;
    --border:      rgba(138, 115, 85, 0.18);

    /* 桜色（彩度控えめの部分使い） */
    --sakura:       #E8A7B0;   /* 花びら・あしらい用 */
    --sakura-light: #F6D7DC;   /* うすい花びら */
    --sakura-wash:  #FBF0F1;   /* 背景のほんのりピンク */
    --sakura-deep:  #B25763;   /* 桜色の文字用（読める濃さを確保） */
    --sakura-line:  rgba(232, 167, 176, 0.45);

    /* ふんわりした暖色の影 */
    --shadow-card: 0 10px 40px rgba(140, 110, 60, 0.12), 0 2px 8px rgba(140, 110, 60, 0.06);
    --shadow-soft: 0 4px 14px rgba(140, 110, 60, 0.14);
    --shadow-btn:  0 6px 18px rgba(184, 134, 11, 0.28);

    /* 弾む動き */
    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* 書体の役割分担 */
    --serif: "Noto Serif JP", serif;                       /* 見出し＝HPと同じ品の良さ */
    --maru:  "Zen Maru Gothic", "Noto Sans JP", sans-serif; /* ボタン・ラベル＝丸くて可愛い声 */
    --sans:  "Noto Sans JP", "Hiragino Kaku Gothic ProN", "メイリオ", sans-serif;
}

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

/* ── ページ背景（HPと同じ生成り＋和紙の質感） ── */
body {
    font-family: var(--sans);
    background-color: var(--washi);
    /* 和紙の質感＋生成り→桜色のやわらかいグラデーション */
    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"),
        linear-gradient(160deg, var(--washi) 0%, var(--sakura-wash) 46%, #F8F0E6 100%);
    background-attachment: fixed;
    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;
}

/* ===================================================
   背景の飾り（花びら・キラキラ・水玉がふわふわ漂う）
=================================================== */
.bg-decor {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* 桜の花びら */
.petal {
    position: absolute;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--sakura-light), var(--sakura));
    border-radius: 74% 14% 74% 14%;
    opacity: 0.65;
    animation: petalSway 9s ease-in-out infinite alternate;
}

.petal-1 { top: 9%;  left: 7%;  transform: rotate(18deg);  }
.petal-2 { top: 24%; right: 8%; transform: rotate(-24deg); width: 17px; height: 17px; animation-delay: -2.5s; }
.petal-3 { bottom: 14%; left: 12%; transform: rotate(48deg); width: 19px; height: 19px; animation-delay: -5s; }
.petal-4 { top: 58%; left: 4%;  transform: rotate(-10deg); width: 15px; height: 15px; animation-delay: -3.5s; }
.petal-5 { bottom: 8%; right: 13%; transform: rotate(30deg); animation-delay: -7s; }

@keyframes petalSway {
    from { translate: 0 0; rotate: 0deg; }
    to   { translate: 10px 16px; rotate: 22deg; }
}

/* キラキラ（四芒星） */
.sparkle {
    position: absolute;
    width: 15px;
    height: 15px;
    background: #D9B45C;
    clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
    opacity: 0.55;
    animation: twinkle 3.6s ease-in-out infinite;
}

.sparkle-1 { top: 15%; right: 16%; }
.sparkle-2 { bottom: 20%; left: 8%; width: 11px; height: 11px; background: var(--sakura); animation-delay: -1.2s; }
.sparkle-3 { top: 46%; right: 5%; width: 12px; height: 12px; animation-delay: -2.4s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.25; scale: 0.8; }
    50%      { opacity: 0.75; scale: 1.1; }
}

/* 水玉 */
.deco-dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
}

.deco-dot-1 { top: 34%; left: 10%; width: 9px; height: 9px; background: var(--sakura-light); }
.deco-dot-2 { bottom: 32%; right: 11%; width: 12px; height: 12px; background: #EBD9A8; }
.deco-dot-3 { top: 7%; right: 34%; width: 7px; height: 7px; background: var(--sakura); }

/* ── コンテナ（丸みのある白いカード） ── */
.container {
    max-width: 600px;
    width: 100%;
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    min-height: 520px;
    position: relative;
    z-index: 1;
}

/* トップライン（金→桜→金のやわらかい帯） */
.container::before {
    content: '';
    display: block;
    height: 5px;
    background: linear-gradient(90deg, #D9B45C, var(--sakura) 50%, #D9B45C);
}

/* ── 画面管理 ── */
.screen {
    display: none;
    opacity: 0;
    min-height: 515px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
}

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

/* 質問画面は進捗バーを上端に固定し、質問を残りの空間の中央に */
#question-screen {
    justify-content: flex-start;
}

#question-screen .content {
    margin: auto 0;
}

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

/* ===================================================
   トップアイコン（クリーム色の丸座布団にのせる）
=================================================== */
.top-icon {
    position: relative;
    margin: 0 auto 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    background: radial-gradient(circle at 50% 40%, var(--white) 0%, #F9E9EA 82%);
    border: 1px solid var(--sakura-line);
    /* 手書き風のゆらゆらした丸（揺らぎ） */
    border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
    box-shadow: var(--shadow-soft);
    animation: floatIn 0.7s var(--bounce) both,
               blobMorph 8s ease-in-out 0.8s infinite alternate,
               iconBob 3.6s ease-in-out 1s infinite alternate;
}

/* アイコンのまわりにキラキラをひとつずつ */
.top-icon::before,
.top-icon::after {
    content: '';
    position: absolute;
    background: #D9B45C;
    clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
    animation: twinkle 3.2s ease-in-out infinite;
}

.top-icon::before {
    width: 16px;
    height: 16px;
    top: -2px;
    right: -10px;
}

.top-icon::after {
    width: 11px;
    height: 11px;
    bottom: 6px;
    left: -14px;
    background: var(--sakura);
    animation-delay: -1.6s;
}

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

@keyframes floatIn {
    from { opacity: 0; transform: translateY(14px) scale(0.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes blobMorph {
    from { border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%; }
    to   { border-radius: 54% 46% 48% 52% / 46% 54% 48% 52%; }
}

/* ロゴがゆっくり上下にふわふわ */
@keyframes iconBob {
    from { transform: translateY(0); }
    to   { transform: translateY(-6px); }
}

/* ── スタート画面：上から順番にふわっと登場 ── */
#start-screen .en-label,
#start-screen .main-title,
#start-screen .deco-divider,
#start-screen .subtitle,
#start-screen .description,
#start-screen .btn-primary {
    animation: riseIn 0.6s var(--bounce) backwards;
}

#start-screen .en-label     { animation-delay: 0.2s; }
#start-screen .main-title   { animation-delay: 0.3s; }
#start-screen .deco-divider { animation-delay: 0.4s; }
#start-screen .subtitle     { animation-delay: 0.5s; }
#start-screen .description  { animation-delay: 0.6s; }
#start-screen .btn-primary  { animation-delay: 0.75s; }

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

/* ===================================================
   タイポグラフィ
=================================================== */

/* 英字ラベル（両側に小さな桜の線画） */
.en-label {
    font-family: var(--maru);
    font-size: 0.68rem;
    letter-spacing: 0.28em;
    color: var(--gold);
    margin-bottom: 12px;
    font-weight: 500;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.en-label::before,
.en-label::after {
    content: '';
    display: inline-block;
    width: 13px;
    height: 13px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23E8A7B0'%3E%3Cellipse cx='12' cy='4.6' rx='3.1' ry='4.2'/%3E%3Cellipse cx='12' cy='19.4' rx='3.1' ry='4.2'/%3E%3Cellipse cx='4.6' cy='12' rx='4.2' ry='3.1'/%3E%3Cellipse cx='19.4' cy='12' rx='4.2' ry='3.1'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%23B8860B'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* メインタイトル（HPと同じ明朝の品格） */
.main-title {
    font-family: var(--serif);
    font-size: 2.4rem;
    color: var(--ink);
    letter-spacing: 0.18em;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.25;
}

/* 区切り＝金の点々の真ん中に桜の花 */
.deco-divider {
    width: 76px;
    height: 16px;
    margin: 0 auto 22px;
    background-image:
        radial-gradient(circle 3px at 8px 8px,  var(--gold-line) 3px, transparent 3.5px),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23E8A7B0'%3E%3Cellipse cx='12' cy='4.6' rx='3.1' ry='4.2'/%3E%3Cellipse cx='12' cy='19.4' rx='3.1' ry='4.2'/%3E%3Cellipse cx='4.6' cy='12' rx='4.2' ry='3.1'/%3E%3Cellipse cx='19.4' cy='12' rx='4.2' ry='3.1'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%23B8860B'/%3E%3C/svg%3E"),
        radial-gradient(circle 3px at 68px 8px, var(--gold-line) 3px, transparent 3.5px);
    background-size: auto, 16px 16px, auto;
    background-position: 0 0, center, 0 0;
    background-repeat: no-repeat;
}

/* サブタイトル（桜色でやさしく） */
.subtitle {
    font-family: var(--maru);
    font-size: 0.95rem;
    color: var(--sakura-deep);
    margin-bottom: 18px;
    letter-spacing: 0.08em;
    font-weight: 700;
}

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

/* ===================================================
   ボタン（丸くて押したくなる形）
=================================================== */
.btn {
    display: inline-block;
    padding: 15px 52px;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform 0.25s var(--bounce), box-shadow 0.3s ease,
                background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    font-family: var(--maru);
    font-weight: 700;
    letter-spacing: 0.12em;
    border-radius: 999px;
    line-height: 1;
}

/* プライマリ — 金色のまるボタン（メインCTA） */
.btn-primary {
    background: linear-gradient(135deg, #C89530, var(--gold));
    color: var(--white);
    border: 1px solid transparent;
    box-shadow: var(--shadow-btn);
    position: relative;
    overflow: hidden;
}

/* ちいさな矢印 */
.btn-primary::before {
    content: '▸ ';
    font-size: 0.85em;
}

/* ときどきキラッとツヤが走る */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 45%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-20deg);
    animation: shine 3.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shine {
    0%   { left: -80%; }
    45%  { left: 135%; }
    100% { left: 135%; }
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(184, 134, 11, 0.36);
}

.btn-primary:active {
    transform: translateY(0) scale(0.96);
    box-shadow: 0 3px 10px rgba(184, 134, 11, 0.3);
}

/* セカンダリ — 金のアウトライン */
.btn-secondary {
    background: var(--white);
    color: var(--gold-deep);
    border: 1.5px solid var(--gold);
    margin-top: 12px;
}

.btn-secondary:hover {
    background: var(--gold);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn);
}

.btn-secondary:active {
    transform: scale(0.96);
}

/* ターシャリ — ひかえめな丸ボタン */
.btn-tertiary {
    background: transparent;
    color: var(--gray-warm);
    border: 1.5px solid var(--border);
    margin-top: 18px;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 11px 30px;
}

.btn-tertiary:hover {
    border-color: var(--gold);
    color: var(--gold-deep);
    background: var(--gold-soft);
}

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

/* ===================================================
   プログレスバー（足あとの道を歩いていく）
=================================================== */
.progress-container {
    padding: 22px 48px 16px;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    width: 100%;
}

/* 道：うっすら足あとの点線 */
.progress-track {
    width: 100%;
    height: 8px;
    background-color: rgba(138, 115, 85, 0.12);
    background-image: radial-gradient(circle 2px at 10px 4px, rgba(184, 134, 11, 0.30) 2px, transparent 2.5px);
    background-size: 20px 8px;
    background-repeat: repeat-x;
    border-radius: 999px;
    margin-bottom: 12px;
    overflow: visible;
}

/* 歩いたぶんだけ金色に */
.progress-fill {
    position: relative;
    height: 100%;
    background: linear-gradient(90deg, #D9B45C, var(--gold));
    border-radius: 999px;
    transition: width 0.6s var(--bounce);
    width: 0%;
    min-width: 8px;
}

/* 先頭を歩く「いまここ」マーカー（桜色のお花風） */
.progress-fill::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: var(--white);
    border: 3px solid var(--sakura);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(201, 112, 124, 0.35);
    animation: markerWalk 1.5s ease-in-out infinite;
}

/* てくてく歩くようにちいさく弾む */
@keyframes markerWalk {
    0%, 100% { transform: translateY(-50%); }
    50%      { transform: translateY(calc(-50% - 3px)); }
}

.progress-text {
    font-family: var(--maru);
    font-size: 0.78rem;
    color: var(--gold-deep);
    text-align: right;
    letter-spacing: 0.12em;
    font-weight: 500;
}

/* ===================================================
   質問画面
=================================================== */
.question-text {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--ink);
    margin-bottom: 32px;
    line-height: 1.9;
    font-weight: 500;
    letter-spacing: 0.08em;
}

/* 質問文の上にまるい「Q」バッジ */
.question-text::before {
    content: 'Q';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--sakura-light), var(--sakura));
    color: var(--white);
    font-family: var(--maru);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0;
    border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
    box-shadow: 0 3px 10px rgba(201, 112, 124, 0.25);
}

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

/* 選択肢（白い丸カード。押すとぽんっと弾む） */
.option-btn {
    padding: 17px 22px;
    font-size: 0.92rem;
    background: var(--white);
    color: var(--ink-warm);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.25s var(--bounce), box-shadow 0.3s ease,
                background-color 0.25s ease, border-color 0.25s ease;
    font-family: var(--maru);
    font-weight: 500;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: 0.04em;
    line-height: 1.7;
}

/* 選択肢は1つずつぽんぽんと登場（質問が変わるたび） */
.option-btn {
    animation: popIn 0.45s var(--bounce) backwards;
}

.option-btn:nth-child(1) { animation-delay: 0.05s; }
.option-btn:nth-child(2) { animation-delay: 0.14s; }
.option-btn:nth-child(3) { animation-delay: 0.23s; }
.option-btn:nth-child(4) { animation-delay: 0.32s; }
.option-btn:nth-child(5) { animation-delay: 0.41s; }

@keyframes popIn {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 選択肢の先頭に桜の花アイコン（触れるとくるっと回る） */
.option-btn::before {
    content: '';
    display: block;
    width: 15px;
    height: 15px;
    min-width: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23E8A7B0'%3E%3Cellipse cx='12' cy='4.6' rx='3.1' ry='4.2'/%3E%3Cellipse cx='12' cy='19.4' rx='3.1' ry='4.2'/%3E%3Cellipse cx='4.6' cy='12' rx='4.2' ry='3.1'/%3E%3Cellipse cx='19.4' cy='12' rx='4.2' ry='3.1'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%23B8860B'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.4s var(--bounce);
}

.option-btn:hover {
    background: #FDF4F5;
    border-color: var(--sakura);
    box-shadow: 0 4px 14px rgba(201, 112, 124, 0.16);
    transform: translateY(-2px);
}

.option-btn:hover::before {
    transform: rotate(180deg) scale(1.2);
}

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

/* ===================================================
   結果画面
=================================================== */

/* お祝いの桜吹雪（結果が出た瞬間にひらひら舞い降りて消える） */
.celebration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}

.celebration span {
    position: absolute;
    top: -26px;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, var(--sakura-light), var(--sakura));
    border-radius: 74% 14% 74% 14%;
    opacity: 0;
    animation: petalFall 3s ease-in 1 both;
}

.celebration span:nth-child(1) { left: 8%;  animation-delay: 0.1s; }
.celebration span:nth-child(2) { left: 22%; animation-delay: 0.6s; width: 11px; height: 11px; }
.celebration span:nth-child(3) { left: 36%; animation-delay: 0.25s; }
.celebration span:nth-child(4) { left: 50%; animation-delay: 0.8s;  width: 12px; height: 12px; }
.celebration span:nth-child(5) { left: 63%; animation-delay: 0.4s; }
.celebration span:nth-child(6) { left: 76%; animation-delay: 1.0s;  width: 11px; height: 11px; }
.celebration span:nth-child(7) { left: 88%; animation-delay: 0.2s; }
.celebration span:nth-child(8) { left: 45%; animation-delay: 1.2s;  width: 10px; height: 10px; background: #EBD9A8; border-radius: 50%; }

@keyframes petalFall {
    0%   { opacity: 0; transform: translate(0, 0) rotate(0deg); }
    8%   { opacity: 0.85; }
    80%  { opacity: 0.7; }
    100% { opacity: 0; transform: translate(34px, 540px) rotate(240deg); }
}

.result-title {
    font-family: var(--serif);
    font-size: 1.55rem;
    color: var(--ink);
    letter-spacing: 0.15em;
    font-weight: 500;
    margin-bottom: 18px;
}

.result-category-label {
    font-family: var(--maru);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    color: var(--sakura-deep);
    margin-bottom: 8px;
    font-weight: 700;
}

.result-card {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 28px;
    margin-bottom: 8px;
    text-align: center;
    animation: slideInUp 0.55s var(--bounce);
}

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

.geta-name {
    font-family: var(--serif);
    font-size: 1.25rem;
    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: 22px;
    line-height: 1.9;
}

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

.product-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 20px 22px;
    text-align: left;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.25s var(--bounce);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.product-info {
    flex: 1;
    min-width: 0;
}

/* 商品の小さなサムネイル画像（右側に配置） */
.product-thumb {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--cream);
    flex-shrink: 0;
    margin-top: 26px; /* 順位バッジのぶん下げて商品名と目線を揃える */
}

/* いちばんのおすすめは金の縁どりでほんのり輝かせる */
.product-card:first-child {
    border-color: var(--gold);
    background: linear-gradient(180deg, #FFFDF8, var(--white));
    box-shadow: 0 4px 18px rgba(184, 134, 11, 0.12);
}

.product-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

/* 順位バッジ（まるいピル型） */
.product-rank {
    display: inline-block;
    padding: 3px 14px;
    font-family: var(--maru);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 10px;
    background: var(--cream);
    color: var(--gray-warm);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.product-card:first-child .product-rank {
    background: linear-gradient(135deg, #C89530, var(--gold));
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
}

/* BESTバッジにきらっとひとつ */
.product-card:first-child .product-rank::before {
    content: '✦ ';
}

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

.product-price {
    font-family: var(--maru);
    font-size: 0.92rem;
    color: var(--gold-deep);
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

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

/* 商品リンク（小さな丸ボタン） */
.product-link {
    display: inline-block;
    padding: 8px 22px;
    background: var(--white);
    color: var(--gold-deep);
    text-decoration: none;
    border: 1.5px solid var(--gold);
    border-radius: 999px;
    font-family: var(--maru);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: transform 0.25s var(--bounce), box-shadow 0.3s ease,
                background-color 0.3s ease, color 0.3s ease;
}

.product-link:hover {
    background: var(--gold);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn);
}

.product-link:active {
    transform: scale(0.96);
}

/* ===================================================
   カテゴリリンクセクション
=================================================== */
.category-link-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--gold-line);
    text-align: center;
}

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

.btn-category {
    margin-top: 0;
    padding: 11px 30px;
    font-size: 0.85rem;
}

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

.fade-in .content {
    animation: fadeIn 0.35s var(--bounce) forwards;
}

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

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

/* ===================================================
   アクセシビリティ
=================================================== */
:where(.btn, .option-btn, .product-link):focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================================
   レスポンシブ（スマホ最優先）
=================================================== */
@media (max-width: 768px) {
    body {
        padding: 16px 12px;
        align-items: flex-start;
    }

    /* スマホでは飾りを少なめにしてすっきりと */
    .sp-hide {
        display: none;
    }

    .petal, .sparkle, .deco-dot {
        opacity: 0.45;
    }

    .container {
        min-height: auto;
        border-radius: 20px;
    }

    .screen {
        min-height: calc(100vh - 40px);
    }

    .content {
        padding: 40px 26px;
    }

    .progress-container {
        padding: 18px 26px 14px;
    }

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

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

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

    .btn {
        padding: 14px 40px;
    }
}

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

    .content {
        padding: 36px 20px;
    }

    .top-icon {
        width: 96px;
        height: 96px;
    }

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

    .description {
        font-size: 0.86rem;
    }

    .option-btn {
        font-size: 0.88rem;
        padding: 15px 18px;
    }

    .product-card {
        gap: 12px;
    }

    .product-thumb {
        width: 64px;
        height: 64px;
    }
}

/* テスト版ラベル（本番には無い） */
.test-ribbon {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 9999;
    background: #B0413E;
    color: #fff;
    font-family: var(--maru);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 4px 12px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}
