/* ========================================
   リセット & 基本設定
======================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --grad-main: linear-gradient(135deg, #ec407a 0%, #ab47bc 100%);
    --grad-main-rev: linear-gradient(135deg, #ab47bc 0%, #ec407a 100%);
    --grad-bg: linear-gradient(160deg, #5b21b6 0%, #9333a8 46%, #db2777 100%);
    --color-accent: #ec407a;
    --color-accent2: #ab47bc;
    --color-gold: #f5b942;
    --color-line: #06C755;
    --color-text: #362a3d;
    --shadow-soft: 0 18px 40px rgba(58, 20, 60, 0.16);
    --shadow-deep: 0 24px 60px rgba(20, 6, 30, 0.4);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f6f3f8;
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   ヘッダー
======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(24, 12, 34, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.brand-mark {
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.brand-mark i { color: var(--color-gold); }
.brand-sub {
    color: rgba(255,255,255,0.68);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

/* ========================================
   メインコンテナ
======================================== */
.main {
    width: 100%;
    min-height: 100vh;
    background: var(--grad-bg);
    position: relative;
}
.main::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 12% 15%, rgba(255,255,255,0.14) 0%, transparent 38%),
        radial-gradient(circle at 88% 78%, rgba(255,255,255,0.10) 0%, transparent 42%),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.page-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 0 8px;
}

/* ========================================
   HERO
======================================== */
.hero-section {
    padding: 48px 22px 36px;
    text-align: center;
    color: #fff;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.32);
    padding: 7px 18px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
    color: #fff8ec;
}
.hero-eyebrow i { color: var(--color-gold); font-size: 11px; }

.hero-title {
    font-family: 'Shippori Mincho', 'Noto Sans JP', serif;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 18px;
    text-shadow: 0 4px 18px rgba(0,0,0,0.28);
    letter-spacing: 0.02em;
}
.hero-title span {
    display: block;
    font-size: 42px;
    background: linear-gradient(90deg, #ffe08a, #ffb8d6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-top: 4px;
}
.hero-lead {
    font-size: 14.5px;
    font-weight: 500;
    color: rgba(255,255,255,0.94);
    margin-bottom: 30px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.hero-poster {
    max-width: 300px;
    margin: 0 auto 32px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-deep);
    border: 4px solid rgba(255,255,255,0.55);
    animation: floatY 4.5s ease-in-out infinite;
}
.hero-poster img { width: 100%; display: block; }

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-note {
    margin-top: 16px;
    font-size: 11.5px;
    color: rgba(255,255,255,0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ========================================
   CTAボタン共通
======================================== */
.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #ffdf8a 0%, #ff9d6a 100%);
    color: #5a2412;
    font-size: 17px;
    font-weight: 800;
    padding: 19px 42px;
    border: none;
    border-radius: 44px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 12px 26px rgba(255, 148, 90, 0.5);
    font-family: 'Noto Sans JP', sans-serif;
    letter-spacing: 0.01em;
}
.cta-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 32px rgba(255, 148, 90, 0.58);
}
.cta-btn:active { transform: translateY(0) scale(0.99); }

.cta-btn-pulse { animation: pulse-gentle 2.6s infinite; }
@keyframes pulse-gentle {
    0% { box-shadow: 0 12px 26px rgba(255,148,90,0.5), 0 0 0 0 rgba(255,224,138,0.55); }
    50% { box-shadow: 0 12px 26px rgba(255,148,90,0.5), 0 0 0 14px rgba(255,224,138,0); }
    100% { box-shadow: 0 12px 26px rgba(255,148,90,0.5), 0 0 0 0 rgba(255,224,138,0); }
}

.cta-btn-outline {
    background: #fff;
    color: var(--color-accent);
    box-shadow: 0 10px 22px rgba(171,71,188,0.18);
    border: 2px solid var(--color-accent);
    width: 100%;
    max-width: 320px;
}
.cta-btn-outline:hover { background: #fff5f8; }

/* テキストリンク風ボタン（やり直す） */
.text-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--color-accent2);
    font-size: 13.5px;
    font-weight: 700;
    padding: 10px 18px;
    cursor: pointer;
    border-radius: 20px;
    transition: background 0.2s ease, color 0.2s ease;
    font-family: 'Noto Sans JP', sans-serif;
}
.text-link-btn:hover { background: #f6e9f4; }
.text-link-btn i { font-size: 12px; }

/* ========================================
   クイズセクション（チャットUI）
======================================== */
.quiz-section { padding: 0 14px; }

.chat-container {
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-deep);
}

.progress-container {
    background: #fff;
    padding: 18px 22px 16px;
    border-bottom: 1px solid #f2e7f0;
    position: sticky;
    top: 0;
    z-index: 10;
}
.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 11px;
    gap: 8px;
}
.progress-text { font-size: 13px; font-weight: 700; color: #4a3d52; }
#currentStep { color: var(--color-accent); font-size: 16px; }
.progress-reward {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-gold);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.progress-bar {
    width: 100%;
    height: 8px;
    background: #f2e7f0;
    border-radius: 10px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--grad-main);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.chat-messages {
    padding: 22px 20px 8px;
    min-height: 100px;
}

.message {
    display: flex;
    gap: 11px;
    margin-bottom: 20px;
    opacity: 0;
    animation: popIn 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}
@keyframes popIn {
    0% { opacity: 0; transform: scale(0.88) translateY(14px); }
    60% { transform: scale(1.02) translateY(-2px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.bot-message { align-items: flex-start; }
.user-message { align-items: flex-end; justify-content: flex-end; }

.avatar-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--grad-main);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(171,71,188,0.3);
    border: 2px solid #fff;
}
.avatar-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-message .avatar-icon { background: #4a3d52; }

.message-content { max-width: 78%; }
.user-message .message-content { display: flex; flex-direction: column; align-items: flex-end; }

.sender-name { font-size: 11px; font-weight: 700; color: #a89bb0; margin-bottom: 5px; padding-left: 4px; }

.message-text {
    background: #f8f1f6;
    padding: 13px 17px;
    border-radius: 18px;
    border-top-left-radius: 4px;
    font-size: 14.5px;
    line-height: 1.75;
    font-weight: 600;
    color: #4a3d52;
}
.user-message .message-text {
    background: var(--grad-main);
    color: #fff;
    border-radius: 18px;
    border-top-right-radius: 4px;
    border-top-left-radius: 18px;
    font-weight: 700;
}

.question-count-badge {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
    letter-spacing: 0.03em;
}

/* ========================================
   選択肢エリア
======================================== */
.chat-options {
    background: #fdfbfc;
    padding: 8px 20px 26px;
    border-top: 1px solid #f2e7f0;
}
.options-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 12px;
}
@media (max-width: 420px) {
    .options-group { grid-template-columns: 1fr; }
}

.option-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.option-item .option-label {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--grad-main);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(171,71,188,0.32);
}

.option-btn {
    width: 100%;
    background: #fff;
    border: 2px solid #efe2ec;
    border-radius: 16px;
    padding: 18px 16px;
    font-family: 'Noto Sans JP', sans-serif;
    color: #333;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    min-height: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}
.option-btn strong {
    display: block;
    width: 100%;
    color: var(--color-accent2);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.55;
    margin-bottom: 7px;
}
.option-btn span.option-sub {
    display: block;
    width: 100%;
    font-weight: 500;
    color: #9a8ba2;
    font-size: 11px;
    line-height: 1.55;
}
.option-btn:hover {
    background: var(--grad-main);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(236, 64, 122, 0.32);
}
.option-btn:hover strong,
.option-btn:hover span.option-sub { color: #fff; }
@media (hover: none) and (pointer: coarse) {
    .option-btn:hover {
        background: #fff; transform: none; box-shadow: none; border-color: #efe2ec;
    }
    .option-btn:hover strong { color: var(--color-accent2); }
    .option-btn:hover span.option-sub { color: #9a8ba2; }
}
.option-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.option-btn { -webkit-tap-highlight-color: transparent; user-select: none; }

/* ========================================
   フォーム入力（お名前・サロン名 等）
======================================== */
.text-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.text-input-field {
    width: 100%;
    padding: 15px 18px;
    font-size: 15px;
    font-family: 'Noto Sans JP', sans-serif;
    border: 2px solid #efe2ec;
    border-radius: 14px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    background: #fff;
    color: var(--color-text);
}
.text-input-field:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(236, 64, 122, 0.1);
}
.text-input-field::placeholder { color: #bdadc4; }

.text-submit-btn {
    width: 100%;
    background: var(--grad-main);
    border: none;
    border-radius: 40px;
    padding: 15px 24px;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    font-family: 'Noto Sans JP', sans-serif;
    box-shadow: 0 10px 20px rgba(171,71,188,0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.text-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(171,71,188,0.4); }
.text-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.input-error-msg {
    font-size: 11.5px;
    color: #e0457a;
    font-weight: 700;
    padding-left: 4px;
    display: none;
}
.input-error-msg.show { display: block; }

/* 役職選択（4択） */
.role-options-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (max-width: 420px) {
    .role-options-group { grid-template-columns: 1fr; }
}
.role-option-btn {
    background: #fff;
    border: 2px solid #efe2ec;
    border-radius: 14px;
    padding: 15px 12px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--color-accent2);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: 'Noto Sans JP', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
}
.role-option-btn i { font-size: 15px; }
.role-option-btn:hover {
    background: var(--grad-main);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(236,64,122,0.28);
}
@media (hover: none) and (pointer: coarse) {
    .role-option-btn:hover { background: #fff; color: var(--color-accent2); transform: none; box-shadow: none; }
}
.role-option-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ========================================
   結果セクション
======================================== */
.result-section { padding: 34px 14px 10px; }
.result-card {
    background: #fff;
    border-radius: 28px;
    padding: 34px 24px 36px;
    text-align: center;
    box-shadow: var(--shadow-deep);
    opacity: 0;
    animation: popIn 0.6s ease forwards;
}
.result-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: var(--color-accent2);
    margin-bottom: 8px;
}
.result-headline { font-size: 15.5px; color: #a89bb0; font-weight: 700; margin-bottom: 8px; }
.result-name {
    font-family: 'Shippori Mincho', serif;
    font-size: 28px;
    font-weight: 800;
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 4px;
    line-height: 1.5;
}
.result-subtitle {
    font-size: 13px;
    font-weight: 800;
    color: var(--color-gold);
    background: #fff7e6;
    display: inline-block;
    padding: 4px 16px;
    border-radius: 14px;
    margin-bottom: 24px;
    letter-spacing: 0.03em;
}

.result-poster-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 26px;
}
.result-poster-frame {
    position: relative;
    width: 210px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(171,71,188,0.28);
    border: 5px solid #fff;
    outline: 3px solid var(--color-accent);
}

.result-block {
    text-align: left;
    background: #faf5f9;
    border-radius: 16px;
    padding: 20px 20px 22px;
    margin-bottom: 16px;
}
.result-block-accent {
    background: linear-gradient(135deg, #fdf2f7 0%, #fdf6ec 100%);
    border: 1px solid #f6dfe9;
}
.result-block h4 {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--color-accent2);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.result-block-text {
    font-size: 13.5px;
    color: #4a3d52;
    line-height: 1.9;
    white-space: pre-line;
    margin-bottom: 10px;
}
.result-block-text:last-child { margin-bottom: 0; }
.result-point-list {
    list-style: none;
    margin: 4px 0 12px;
}
.result-point-list li {
    font-size: 13.5px;
    color: #4a3d52;
    line-height: 1.75;
    padding-left: 22px;
    position: relative;
    margin-bottom: 9px;
    font-weight: 600;
}
.result-point-list li:last-child { margin-bottom: 0; }
.result-point-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--color-accent);
    font-weight: 800;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

/* ========================================
   個別SNSアカウント診断のご案内セクション
======================================== */
.personal-diagnosis-section { padding: 8px 14px 10px; }
.personal-diagnosis-card {
    background: #fff;
    border-radius: 26px;
    padding: 30px 24px 32px;
    text-align: center;
    box-shadow: var(--shadow-deep);
    opacity: 0;
    animation: popIn 0.6s ease 0.05s forwards;
}
.personal-diagnosis-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fdf2f7;
    color: var(--color-accent2);
    border: 1px solid #f3d9ec;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 18px;
}
.personal-diagnosis-lead {
    font-size: 14.5px;
    font-weight: 700;
    color: #4a3d52;
    line-height: 1.9;
    white-space: pre-line;
    margin-bottom: 10px;
}
.personal-diagnosis-note {
    font-size: 11.5px;
    color: #b0a2b7;
    margin-bottom: 22px;
}

/* ========================================
   SNSアカウント診断 特典セクション
======================================== */
.sns-bonus-section { padding: 8px 14px 40px; }
.sns-bonus-card {
    background: #fff;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow-deep);
    opacity: 0;
    animation: popIn 0.6s ease 0.15s forwards;
}
.sns-bonus-header {
    background: linear-gradient(135deg, #ff8a5c 0%, #ec407a 55%, #ab47bc 100%);
    padding: 30px 26px 26px;
    text-align: center;
    color: #fff;
    position: relative;
}
.sns-bonus-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.5);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 14px;
}
.sns-bonus-title {
    font-size: 19px;
    font-weight: 900;
    line-height: 1.6;
    margin-bottom: 10px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.sns-bonus-lead { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.92); }

.sns-bonus-body { padding: 26px 24px 30px; background: #fff; }
.sns-bonus-name {
    text-align: center;
    font-size: 16.5px;
    font-weight: 800;
    color: var(--color-accent2);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.sns-bonus-list { list-style: none; margin-bottom: 26px; }
.sns-bonus-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: #4a3d52;
    line-height: 1.7;
    margin-bottom: 13px;
    background: #faf5f9;
    padding: 12px 14px;
    border-radius: 12px;
}
.sns-bonus-list li:last-child { margin-bottom: 0; }
.sns-bonus-list li i { color: var(--color-line); font-size: 15px; margin-top: 2px; flex-shrink: 0; }

.line-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #06C755 0%, #04a548 100%);
    color: #fff;
    font-size: 16.5px;
    font-weight: 800;
    padding: 18px 24px;
    border-radius: 40px;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(6,199,85,0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin-bottom: 12px;
}
.line-cta-btn i { font-size: 20px; }
.line-cta-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 32px rgba(6,199,85,0.48); }
.line-cta-btn:active { transform: translateY(0) scale(1); }

.sns-bonus-note { text-align: center; font-size: 11px; color: #b0a2b7; }

/* ========================================
   ローディング
======================================== */
.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(24,12,34,0.82);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loading-content { text-align: center; color: #fff; }
.spinner {
    width: 52px; height: 52px;
    border: 4px solid rgba(255,255,255,0.28);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 18px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; font-weight: 600; }

/* ========================================
   フッター
======================================== */
.site-footer {
    text-align: center;
    padding: 26px 14px 44px;
    color: rgba(255,255,255,0.68);
    font-size: 11px;
    position: relative;
    z-index: 1;
}

.hidden { display: none !important; }

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 480px) {
    .hero-section { padding: 38px 18px 28px; }
    .hero-title { font-size: 28px; }
    .hero-title span { font-size: 33px; }
    .hero-lead { font-size: 13.5px; }
    .cta-btn { font-size: 15.5px; padding: 17px 30px; width: 100%; max-width: 320px; }
    .result-name { font-size: 24px; }
    .sns-bonus-title { font-size: 17px; }
}
