/* StyleAI カスタムスタイル */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
    --color-main:    #6C3483;
    --color-accent:  #D4AC0D;
    --color-light:   #F5EEF8;
    --color-dark:    #4A235A;
    --color-text:    #2C2C2C;
    --color-muted:   #6B7280;
    --color-border:  #E5E7EB;
    --color-white:   #FFFFFF;
    --color-success: #059669;
    --color-error:   #DC2626;
    --radius:        0.75rem;
    --shadow:        0 4px 24px rgba(108, 52, 131, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    color: var(--color-text);
    background: #FAF7FD;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ── ページ管理 ─────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ── ヘッダー ────────────────────────────────────── */
.site-header {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-main) 100%);
    color: white;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: linear-gradient(90deg, #fff, var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── ボタン ──────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-main), var(--color-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(108, 52, 131, 0.4);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-accent {
    background: linear-gradient(135deg, var(--color-accent), #B8960B);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 172, 13, 0.4);
}
.btn-accent:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    color: var(--color-main);
    border: 2px solid var(--color-main);
}
.btn-outline:hover {
    background: var(--color-light);
}

.btn-lg { font-size: 1.125rem; min-height: 56px; padding: 1rem 2rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── カード ──────────────────────────────────────── */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid rgba(108, 52, 131, 0.08);
}

/* ── フォーム ─────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-main);
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--color-border);
    border-radius: 0.5rem;
    outline: none;
    transition: border-color 0.2s;
    background: white;
}
.form-input:focus {
    border-color: var(--color-main);
    box-shadow: 0 0 0 3px rgba(108, 52, 131, 0.1);
}

/* ── アップロードエリア ────────────────────────────── */
.upload-area {
    border: 3px dashed var(--color-main);
    border-radius: var(--radius);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
    background: var(--color-light);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.upload-area:hover, .upload-area.drag-over {
    background: #EDE4F5;
}
.upload-area img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 0.5rem;
    object-fit: contain;
}

/* ── ローディング ─────────────────────────────────── */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(74, 35, 90, 0.85);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}
.loading-overlay.active {
    display: flex;
}
.spinner {
    width: 64px;
    height: 64px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 診断結果 ─────────────────────────────────────── */
.season-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}
.season-春 { background: linear-gradient(135deg, #f472b6, #fb923c); }
.season-夏 { background: linear-gradient(135deg, #60a5fa, #a78bfa); }
.season-秋 { background: linear-gradient(135deg, #d97706, #b45309); }
.season-冬 { background: linear-gradient(135deg, #1e3a5f, #3b82f6); }

.color-swatch {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    vertical-align: middle;
    margin-right: 0.25rem;
}

/* ── アラート ─────────────────────────────────────── */
.alert {
    padding: 0.9rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: none;
}
.alert.show { display: block; }
.alert-error   { background: #FEF2F2; color: var(--color-error); border: 1px solid #FECACA; }
.alert-success { background: #ECFDF5; color: var(--color-success); border: 1px solid #A7F3D0; }
.alert-info    { background: var(--color-light); color: var(--color-main); border: 1px solid #DDD6FE; }

/* ── ナビゲーション ───────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--color-border);
    display: flex;
    z-index: 50;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.25rem;
    cursor: pointer;
    color: var(--color-muted);
    font-size: 0.75rem;
    font-weight: 500;
    min-height: 60px;
    transition: color 0.2s;
    border: none;
    background: none;
    font-family: inherit;
    text-decoration: none;
}
.bottom-nav-item.active, .bottom-nav-item:hover {
    color: var(--color-main);
}
.bottom-nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 3px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── 残り回数バッジ ───────────────────────────────── */
.usage-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* ── レスポンシブ ─────────────────────────────────── */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1rem;
}

.pb-nav { padding-bottom: 80px; }

@media (min-width: 768px) {
    body { font-size: 17px; }
    .card { padding: 2rem; }
}

/* ── アニメーション ───────────────────────────────── */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── プランカード ─────────────────────────────────── */
.plan-card {
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: border-color 0.2s;
}
.plan-card.current {
    border-color: var(--color-main);
    background: var(--color-light);
}
.plan-card.recommended {
    border-color: var(--color-accent);
}
.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.8rem;
    border-radius: 9999px;
    white-space: nowrap;
}

/* ── 履歴アイテム ─────────────────────────────────── */
.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.15s;
    border: 1px solid rgba(108, 52, 131, 0.08);
}
.history-item:hover { transform: translateY(-2px); }

/* ── 楽天商品グリッド ────────────────────────────────── */
.products-header {
    background: white;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 1rem 1.25rem 0.75rem;
    border: 1px solid rgba(108,52,131,0.1);
    border-bottom: none;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    background: white;
    padding: 0.75rem 1rem 1rem;
    border: 1px solid rgba(108,52,131,0.1);
    border-radius: 0 0 var(--radius) var(--radius);
}

.product-card {
    display: flex;
    flex-direction: column;
    background: #fafafa;
    border: 1px solid var(--color-border);
    border-radius: 0.625rem;
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.15s, box-shadow 0.15s;
}
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108,52,131,0.15);
}

.product-img-wrap {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f0f0f0;
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 0.5rem 0.6rem 0.6rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.product-name {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #BF0000;
}
.product-shop {
    font-size: 0.65rem;
    color: var(--color-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-btn {
    display: inline-block;
    margin-top: 0.3rem;
    background: #BF0000;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 0.25rem;
    text-align: center;
}

/* ── 楽天検索リンクカード ────────────────────────────── */
.search-links-header {
    background: white;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 1rem 1.25rem 0.75rem;
    border: 1px solid rgba(108,52,131,0.12);
    border-bottom: none;
}

.search-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
    background: white;
    padding: 0.75rem 1rem 1rem;
    border: 1px solid rgba(108,52,131,0.12);
    border-radius: 0 0 var(--radius) var(--radius);
}

.search-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(160deg, #fdf8ff 0%, #f5eef8 100%);
    border: 1px solid rgba(108,52,131,0.15);
    border-radius: var(--radius);
    padding: 1rem 0.75rem;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    gap: 0.3rem;
}
.search-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(108,52,131,0.18);
    background: linear-gradient(160deg, #f0e6fa 0%, #e8d5f5 100%);
}
.search-card:active {
    transform: translateY(-1px);
}

.search-card-icon {
    font-size: 2rem;
    line-height: 1;
    display: block;
    margin-bottom: 0.15rem;
}
.search-card-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-dark);
    display: block;
}
.search-card-kw {
    font-size: 0.65rem;
    color: var(--color-muted);
    display: block;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.search-card-btn {
    display: inline-block;
    margin-top: 0.4rem;
    background: linear-gradient(135deg, var(--color-dark), var(--color-main));
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    letter-spacing: 0.02em;
}

/* 小さいスピナー（商品ロード中） */
.spinner-small {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--color-main);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

/* ── 写真パネル（自分の写真 ＋ ムードボード） ────────── */
.photo-panel {
    flex: 1;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(108,52,131,0.1);
    display: flex;
    flex-direction: column;
}
.photo-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-main);
    background: var(--color-light);
    padding: 0.4rem 0.75rem;
    text-align: center;
}
.photo-img {
    width: 100%;
    flex: 1;
    object-fit: contain;
    background: #f9f6fc;
    display: block;
    min-height: 200px;
    max-height: 360px;
}

/* ── 診断結果ヒーロー ─────────────────────────────── */
.result-hero {
    background: linear-gradient(160deg, var(--color-dark) 0%, var(--color-main) 100%);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}
.result-hero::before {
    content: '✦';
    position: absolute;
    font-size: 8rem;
    opacity: 0.04;
    top: -1rem;
    right: -1rem;
}

/* ── カラーアイテム ────────────────────────────────── */
.color-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #fafafa;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
}
.color-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ── コーデカード ──────────────────────────────────── */
.outfit-card {
    background: linear-gradient(135deg, #fdf8ff, #f5eef8);
    border: 1px solid rgba(108,52,131,0.15);
    border-radius: 0.625rem;
    padding: 0.875rem 1rem;
    position: relative;
}
.outfit-num {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-main);
    background: rgba(108,52,131,0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    display: inline-block;
    margin-bottom: 0.4rem;
}
.outfit-text {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.6;
    font-weight: 500;
}

/* ── LP ヒーロー ──────────────────────────────────── */
.hero {
    background: linear-gradient(160deg, var(--color-dark) 0%, var(--color-main) 60%, #9B59B6 100%);
    color: white;
    padding: 4rem 1.5rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    height: 60px;
    background: #FAF7FD;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

/* ══════════════════════════════════════════════════════════
   診断結果 Magazine Redesign
   ══════════════════════════════════════════════════════════ */

/* ── シーズン発表ヒーロー ─────────────────────────────── */
.result-reveal-hero {
    position: relative;
    min-height: 68vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    color: white;
}

.reveal-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}
.reveal-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.55) 100%);
}
/* シーズン別グラデーション（画像なし時フォールバック） */
.reveal-bg.season-春 { background: linear-gradient(160deg,#b05070,#d07898,#e8a0b8); }
.reveal-bg.season-夏 { background: linear-gradient(160deg,#3a6090,#6080b8,#90a8d8); }
.reveal-bg.season-秋 { background: linear-gradient(160deg,#7a4820,#a86830,#c89858); }
.reveal-bg.season-冬 { background: linear-gradient(160deg,#222235,#38385a,#58587a); }

.reveal-content {
    position: relative;
    z-index: 1;
    padding: 2rem 1.5rem 3rem;
    animation: revealFadeUp 0.9s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes revealFadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

.reveal-date {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 1rem;
}
.reveal-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    margin-bottom: 1.25rem;
}
.reveal-season-name {
    font-size: clamp(5rem, 22vw, 7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin: 0 0 0.4rem;
    color: #fff;
    text-shadow: 0 4px 24px rgba(0,0,0,0.35);
    font-family: 'Noto Sans JP', sans-serif;
}
.reveal-season-en {
    font-size: 0.8rem;
    letter-spacing: 0.45em;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
    margin-bottom: 1.5rem;
}
.reveal-body-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 9999px;
    padding: 0.45rem 1.5rem;
    font-size: 0.95rem;
    color: white;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.reveal-body-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    max-width: 280px;
    margin: 0 auto;
    display: none;
}
.reveal-body-desc.show { display: block; }

.reveal-scroll {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: rgba(255,255,255,0.45);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    animation: revealBounce 2.5s ease-in-out infinite;
    z-index: 1;
}
@keyframes revealBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(7px); }
}

/* ── マガジンコンテンツラッパー ──────────────────────── */
.result-magazine {
    background: #FAF7FD;
}

/* ── 写真セクション ──────────────────────────────────── */
.mag-photos {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1rem;
    background: white;
    border-bottom: 1px solid rgba(108,52,131,0.07);
}
.mag-photo-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 3px 16px rgba(108,52,131,0.12);
}
.mag-photo-img {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    background: #f5f0fa;
    display: block;
}
.mag-photo-caption {
    background: var(--color-dark);
    color: rgba(255,255,255,0.8);
    text-align: center;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.45rem;
}
.mag-moodboard-only {
    padding: 1.25rem 1rem;
    background: white;
    border-bottom: 1px solid rgba(108,52,131,0.07);
}
.mag-moodboard-img {
    width: 100%;
    border-radius: var(--radius);
    display: block;
    box-shadow: 0 3px 16px rgba(108,52,131,0.12);
}

/* ── デザイナーコメント ──────────────────────────────── */
.designer-message-card {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-main) 100%);
    padding: 2rem 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.125rem;
}
.dm-portrait {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid rgba(212,172,13,0.7);
    background: rgba(255,255,255,0.12);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.dm-portrait-fallback {
    font-size: 2.5rem;
    color: var(--color-accent);
    line-height: 1;
}
.dm-portrait-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.dm-body {
    width: 100%;
}
.dm-from {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.dm-text {
    color: rgba(255,255,255,0.92);
    font-size: 1rem;
    line-height: 1.9;
    font-style: italic;
    position: relative;
    padding: 0 0.5rem;
}
.dm-text::before {
    content: '\201C';
    display: block;
    font-size: 3rem;
    color: var(--color-accent);
    line-height: 0.8;
    font-style: normal;
    font-family: Georgia, serif;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

/* ── マガジンブロック共通 ─────────────────────────────── */
.mag-block {
    padding: 1.75rem 1.25rem;
    background: white;
    border-bottom: 1px solid rgba(108,52,131,0.07);
}
.mag-block-alt {
    background: #FAF7FD;
}
.mag-block-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid rgba(108,52,131,0.08);
}
.mag-num {
    font-size: 2.25rem;
    font-weight: 800;
    color: rgba(108,52,131,0.12);
    line-height: 1;
    letter-spacing: -0.04em;
    flex-shrink: 0;
    font-family: Georgia, serif;
}
.mag-block-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-dark);
    letter-spacing: 0.06em;
    line-height: 1.2;
}
.mag-block-sub {
    font-size: 0.72rem;
    color: var(--color-muted);
    margin-top: 0.15rem;
}

/* ── カラーパレット（横長スウォッチ） ──────────────────── */
.palette-swatches {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.palette-swatch {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    height: 76px;
}
.swatch-color {
    width: 84px;
    flex-shrink: 0;
}
.swatch-info {
    flex: 1;
    background: white;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.1rem;
}
.swatch-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--color-dark);
}
.swatch-hex {
    font-size: 0.68rem;
    color: var(--color-muted);
    letter-spacing: 0.06em;
    font-family: 'Courier New', monospace;
}
.swatch-reason {
    font-size: 0.72rem;
    color: var(--color-muted);
    line-height: 1.4;
    margin-top: 0.15rem;
}

/* ── スタイルポイント ─────────────────────────────────── */
.style-point-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.style-point-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: white;
    border-radius: 0.625rem;
    border-left: 3px solid var(--color-main);
    box-shadow: 0 1px 6px rgba(108,52,131,0.07);
}
.style-point-num {
    font-size: 0.68rem;
    font-weight: 700;
    color: white;
    background: var(--color-main);
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.15rem;
}
.style-point-text {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.65;
}

/* ── コーディネート ──────────────────────────────────── */
.outfit-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.outfit-item {
    background: linear-gradient(135deg, #fdf8ff, #f5eef8);
    border-radius: 0.75rem;
    padding: 1rem 1.125rem 1rem 2.75rem;
    border: 1px solid rgba(212,172,13,0.18);
    position: relative;
}
.outfit-item-num {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.6rem;
    font-weight: 800;
    color: rgba(212,172,13,0.35);
    font-family: Georgia, serif;
    line-height: 1;
}
.outfit-item-text {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--color-text);
}

/* ── NGスタイルタグ ──────────────────────────────────── */
.ng-tag-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.ng-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #fff2f2;
    border: 1px solid rgba(220,38,38,0.18);
    border-radius: 9999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
    color: #9a3232;
}
.ng-tag-x {
    font-size: 0.68rem;
    color: #dc2626;
    font-weight: 700;
}

/* ── 総合アドバイス ──────────────────────────────────── */
.mag-advice {
    padding: 2.25rem 1.5rem;
    background: linear-gradient(160deg, var(--color-dark) 0%, var(--color-main) 100%);
    text-align: center;
}
.advice-label {
    font-size: 0.68rem;
    letter-spacing: 0.25em;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 1.25rem;
}
.advice-body {
    font-size: 1rem;
    line-height: 2.1;
    color: rgba(255,255,255,0.92);
    text-align: left;
}

/* ── アクションボタン ────────────────────────────────── */
.mag-actions {
    padding: 1.75rem 1.25rem 1.5rem;
    background: #FAF7FD;
}

/* ══════════════════════════════════════════════════════════
   アニメーション
   ══════════════════════════════════════════════════════════ */

/* ── ヒーロー：輝きドット ─────────────────────────────── */
.result-reveal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
    animation: heroSparkle 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes heroSparkle {
    0%, 100% { opacity: 0.3; }
    50%       { opacity: 0.9; }
}

/* ── シーズン名：グロー ───────────────────────────────── */
@keyframes seasonGlow {
    0%, 100% { text-shadow: 0 4px 24px rgba(0,0,0,0.35); }
    50%       { text-shadow: 0 4px 50px rgba(255,255,255,0.45), 0 0 80px rgba(255,255,255,0.15); }
}
.reveal-season-name {
    animation: revealFadeUp 0.9s cubic-bezier(.22,.61,.36,1) both,
               seasonGlow 3.5s ease-in-out 1s infinite;
}

/* ── スクロール発動：フェードアップ ─────────────────────── */
.mag-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.22,.61,.36,1);
}
.mag-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── カラースウォッチ：左からスライドイン ───────────────── */
.palette-swatch {
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.22,.61,.36,1);
}
.palette-swatches.anim-ready .palette-swatch { opacity: 0; }
.palette-swatches.visible .palette-swatch    { opacity: 1; transform: translateX(0); }

/* ── スタイルポイント：左からスライドイン ───────────────── */
.style-point-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.style-point-list.visible .style-point-item { opacity: 1; transform: translateX(0); }

/* ── NGタグ：ポップイン ─────────────────────────────────── */
.ng-tag {
    opacity: 0;
    transform: scale(0.75);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
.ng-tag-wrap.visible .ng-tag { opacity: 1; transform: scale(1); }

/* ── コーデカード：フェードアップ ───────────────────────── */
.outfit-item {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.outfit-list.visible .outfit-item { opacity: 1; transform: translateY(0); }

/* ── バーチャル試着 ──────────────────────────────────────── */
.tryon-garments-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.tryon-garment-card {
    flex-shrink: 0;
    width: 120px;
    border-radius: var(--radius);
    border: 2px solid var(--color-border);
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    position: relative;
    scroll-snap-align: start;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tryon-garment-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.tryon-garment-name {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.4rem 0.4rem 0.2rem;
    color: var(--color-text);
    line-height: 1.3;
}

.tryon-garment-note {
    font-size: 0.65rem;
    color: var(--color-muted);
    padding: 0 0.4rem 0.4rem;
    line-height: 1.3;
}

.tryon-garment-card.matched {
    border-color: var(--color-accent);
}

.tryon-garment-card.selected {
    border-color: var(--color-main);
    box-shadow: 0 0 0 3px rgba(108, 52, 131, 0.25);
}

.tryon-match-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    white-space: nowrap;
}
