/* ============================================================
   AGA クリニック診断ファインダー — Styles v2
   Material Symbols + フラットカラー丸（影・発光なし）
   ============================================================ */

.acf-wrapper {
    max-width: 640px;
    margin: 32px auto;
    padding: 28px 24px;
    font-family: 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
    -webkit-font-smoothing: antialiased;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
}
.acf-wrapper * { box-sizing: border-box; }

.acf-hidden { display: none !important; }

/* --- Header --- */
.acf-header { text-align: center; margin-bottom: 24px; }
.acf-title { font-size: 20px; font-weight: 800; color: #1a1a2e; margin: 0 0 6px; line-height: 1.4; }
.acf-subtitle { font-size: 13px; color: #6b7280; margin: 0; }

/* --- Step Indicator --- */
.acf-steps { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 28px; }
.acf-step { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.acf-step-circle {
    width: 32px; height: 32px; border-radius: 50%;
    background: #e5e7eb; color: #9ca3af;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; transition: all 0.35s ease;
}
.acf-step-active .acf-step-circle { width: 36px; height: 36px; background: #4f46e5; color: #fff; font-size: 15px; }
.acf-step-done .acf-step-circle { background: #10b981; color: #fff; }
.acf-step-label { font-size: 11px; color: #9ca3af; font-weight: 500; transition: color 0.3s ease; }
.acf-step-active .acf-step-label { color: #4f46e5; font-weight: 700; }
.acf-step-done .acf-step-label { color: #10b981; }
.acf-step-line { width: 40px; height: 3px; background: #e5e7eb; border-radius: 2px; margin: 0 8px; margin-bottom: 18px; transition: background 0.35s ease; }
.acf-step-line-done { background: #10b981; }

/* --- Panel --- */
.acf-panel { animation: acfFadeIn 0.35s ease; }
@keyframes acfFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Question --- */
.acf-question { font-size: 17px; font-weight: 700; color: #1a1a2e; text-align: center; margin: 0 0 18px; }

/* --- Material Symbols 共通 --- */
.material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

/* --- Step 1: Priority Cards --- */
.acf-priority-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.acf-priority-card {
    display: flex; flex-direction: column; align-items: center;
    padding: 22px 14px; border-radius: 16px; border: 2px solid #e5e7eb;
    background: #fff; cursor: pointer; transition: all 0.2s ease;
    -webkit-appearance: none; appearance: none; font-family: inherit;
}
.acf-priority-card:hover { border-color: #c7d2fe; transform: translateY(-2px); }
.acf-priority-card:active,
.acf-priority-card.acf-selected { border-color: #4f46e5; background: #eef2ff; }

.acf-priority-icon {
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 8px; flex-shrink: 0;
}
.acf-priority-icon .material-symbols-rounded { font-size: 28px; }

/* フラットカラー（影・発光なし） */
.acf-icon-cost        { background: #FBBF24; color: #fff; }
.acf-icon-convenience { background: #60A5FA; color: #fff; }
.acf-icon-safety      { background: #F472B6; color: #fff; }
.acf-icon-treatment   { background: #34D399; color: #fff; }

.acf-priority-title { font-size: 15px; font-weight: 700; color: #1a1a2e; margin-bottom: 4px; text-align: center; }
.acf-priority-sub { font-size: 11px; color: #6b7280; text-align: center; line-height: 1.4; }

/* --- Step 2: Detail Options --- */
.acf-detail-options { display: flex; flex-direction: column; gap: 10px; }

.acf-detail-card {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 20px; border-radius: 14px; border: 2px solid #e5e7eb;
    background: #fff; cursor: pointer; transition: all 0.2s ease;
    -webkit-appearance: none; appearance: none; font-family: inherit;
    width: 100%; text-align: left;
}
.acf-detail-card:hover { border-color: #c7d2fe; transform: translateY(-1px); }
.acf-detail-card:active,
.acf-detail-card.acf-selected { border-color: #4f46e5; background: #eef2ff; }

.acf-detail-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.acf-detail-icon .material-symbols-rounded { font-size: 22px; }

/* Step2 カラーパレット */
.acf-detail-amber   { background: #FBBF24; color: #fff; }
.acf-detail-orange   { background: #FB923C; color: #fff; }
.acf-detail-slate    { background: #94A3B8; color: #fff; }
.acf-detail-indigo   { background: #6366F1; color: #fff; }
.acf-detail-teal     { background: #14B8A6; color: #fff; }
.acf-detail-emerald  { background: #10B981; color: #fff; }
.acf-detail-violet   { background: #8B5CF6; color: #fff; }
.acf-detail-sky      { background: #3B82F6; color: #fff; }
.acf-detail-pink     { background: #EC4899; color: #fff; }

.acf-detail-label { font-size: 15px; font-weight: 600; color: #1a1a2e; }

.acf-back-btn {
    display: block; margin: 18px auto 0; padding: 8px 20px;
    border-radius: 8px; border: 1px solid #d1d5db; background: #fff;
    color: #6b7280; font-size: 13px; font-family: inherit; cursor: pointer;
    transition: all 0.2s ease;
}
.acf-back-btn:hover { background: #f9fafb; color: #374151; }

/* --- Step 3: Results --- */
.acf-result-header {
    text-align: center; padding: 24px 20px;
    background: linear-gradient(135deg, #eef2ff 0%, #ecfdf5 100%);
    border-radius: 16px; margin-bottom: 20px;
}
.acf-result-lead { font-size: 13px; color: #6b7280; margin: 0 0 2px; }
.acf-result-title { font-size: 20px; font-weight: 800; color: #1a1a2e; margin: 0 0 6px; }
.acf-result-condition {
    font-size: 12px; color: #6b7280; margin: 0;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.acf-result-condition .acf-tag {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    background: #fff; font-weight: 600; color: #4f46e5; font-size: 12px;
}

/* --- Clinic Result Card --- */
.acf-clinic-card {
    padding: 20px; border-radius: 16px; background: #fff;
    margin-bottom: 14px; position: relative; overflow: hidden;
    border: 2px solid transparent;
}
.acf-clinic-card-rank1 { border-color: #fbbf24; }
.acf-clinic-card-rank2 { border-color: #9ca3af; }
.acf-clinic-card-rank3 { border-color: #d97706; }

.acf-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.acf-card-name-area { display: flex; align-items: center; gap: 10px; }

.acf-rank-badge {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.acf-rank-1 { background: #f59e0b; }
.acf-rank-2 { background: #9ca3af; }
.acf-rank-3 { background: #cd7f32; }

.acf-clinic-name { font-size: 16px; font-weight: 700; color: #1a1a2e; margin: 0; line-height: 1.3; }
.acf-clinic-plan { font-size: 12px; color: #6b7280; margin: 2px 0 0; }

.acf-match-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.acf-match-best { background: #dcfce7; color: #166534; }

/* --- Score Bar --- */
.acf-score-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.acf-score-bar-bg { flex: 1; height: 10px; background: #f3f4f6; border-radius: 5px; overflow: hidden; }
.acf-score-bar-fill { height: 100%; border-radius: 5px; transition: width 0.7s ease; }
.acf-score-number { font-size: 14px; font-weight: 700; color: #1a1a2e; min-width: 42px; text-align: right; }

/* --- Info Grid --- */
.acf-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.acf-info-cell { background: #f9fafb; padding: 8px 10px; border-radius: 8px; }
.acf-info-label { display: block; font-size: 11px; color: #6b7280; margin-bottom: 2px; }
.acf-info-value { font-size: 14px; font-weight: 700; color: #1a1a2e; }

/* --- Tags --- */
.acf-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.acf-tag-item { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.acf-tag-refund { background: #fee2e2; color: #991b1b; }
.acf-tag-blood { background: #dbeafe; color: #1e40af; }
.acf-tag-inperson { background: #f3e8ff; color: #6b21a8; }
.acf-tag-latenight { background: #ecfdf5; color: #065f46; }
.acf-tag-online { background: #fff7ed; color: #9a3412; }

/* --- Coupon --- */
.acf-coupon-box {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: #fefce8; border: 1px dashed #facc15;
    border-radius: 10px; margin-bottom: 12px;
}
.acf-coupon-label { font-size: 11px; color: #854d0e; font-weight: 600; white-space: nowrap; }
.acf-coupon-code { font-size: 15px; font-weight: 800; color: #92400e; font-family: 'Courier New', monospace; letter-spacing: 0.05em; flex: 1; }
.acf-coupon-copy-btn {
    padding: 5px 12px; border-radius: 6px; border: 1px solid #facc15;
    background: #fff; color: #92400e; font-size: 12px; font-weight: 700;
    cursor: pointer; font-family: inherit; transition: all 0.2s ease; white-space: nowrap;
}
.acf-coupon-copy-btn:hover { background: #fef9c3; }
.acf-coupon-copy-btn.acf-copied { background: #10b981; color: #fff; border-color: #10b981; }

/* --- Highlight --- */
.acf-highlight { font-size: 13px; color: #4b5563; margin: 0 0 14px; line-height: 1.5; }

/* --- CTA Button --- */
.acf-cta-btn {
    display: block; width: 100%; padding: 14px 20px; border-radius: 12px;
    border: none; background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff; font-size: 15px; font-weight: 700; text-align: center;
    text-decoration: none; cursor: pointer; font-family: inherit; transition: all 0.2s ease;
}
.acf-cta-btn:hover { transform: translateY(-1px); color: #fff; text-decoration: none; }
.acf-cta-btn:visited { color: #fff; }
.acf-cta-sub { display: block; font-size: 11px; font-weight: 400; opacity: 0.85; margin-top: 2px; }

/* --- Retry Button --- */
.acf-retry-btn {
    display: block; margin: 24px auto 0; padding: 14px 32px;
    border-radius: 12px; border: none; background: #4f46e5;
    color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
    font-family: inherit; transition: all 0.2s ease;
}
.acf-retry-btn:hover { background: #4338ca; transform: translateY(-1px); }

/* --- Responsive --- */
@media (max-width: 480px) {
    .acf-wrapper { padding: 0 12px; }
    .acf-title { font-size: 18px; }
    .acf-priority-grid { grid-template-columns: 1fr; }
    .acf-priority-card { flex-direction: row; padding: 16px; gap: 12px; text-align: left; }
    .acf-priority-icon { margin-bottom: 0; }
    .acf-priority-title, .acf-priority-sub { text-align: left; }
    .acf-info-grid { grid-template-columns: 1fr; }
}
