@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@300;400;500;600;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans+SC:wght@400;700&display=swap');

/* ===== CSS Variables ===== */
:root {
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #f43f5e;
    --accent: #06b6d4;
    --yellow: #fbbf24;
    --green: #34d399;
    --pink: #f472b6;
    --orange: #fb923c;
    --bg-start: #fdf4ff;
    --bg-end: #ede9fe;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-dark: #1e1b4b;
    --text-mid: #4c3f8f;
    --text-light: #7c6fc0;
    --shadow-pop: 4px 4px 0px #7c3aed;
    --shadow-pop-sm: 3px 3px 0px #a78bfa;
    --radius: 24px;
    --radius-sm: 16px;
    --radius-pill: 999px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Zen Kaku Gothic New', 'Alegreya Sans SC', sans-serif;
    font-weight: 500;
    color: var(--text-dark);
    min-height: 100vh;
    letter-spacing: .5px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

p {
    font-weight: 500;
    line-height: 1.7;
}
#footer {
    display: none;
}
/* ===== Background ===== */
#wrapper {
    min-height: 100vh;
    width: 100%;
    position: relative;
    animation: bgShift 20s ease infinite;
}

#wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(244, 63, 94, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

@keyframes bgShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Floating decorations */
#wrapper::after {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(244, 114, 182, 0.15));
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(30px) rotate(10deg); }
}

#content {
    position: relative;
    z-index: 1;
    padding: 0;
}

/* ===== Floating Shapes (decorative) ===== */
.deco-shape {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.12;
}
.deco-shape--1 {
    width: 200px;
    height: 200px;
    background: var(--accent);
    bottom: -60px;
    left: -60px;
    animation: float 6s ease-in-out infinite reverse;
}
.deco-shape--2 {
    width: 120px;
    height: 120px;
    background: var(--yellow);
    top: 30%;
    left: 5%;
    animation: float 10s ease-in-out infinite;
}
.deco-shape--3 {
    width: 80px;
    height: 80px;
    background: var(--pink);
    top: 15%;
    right: 8%;
    animation: float 7s ease-in-out infinite 2s;
}

/* ===== Custom Mouse (PC only) ===== */
@media screen and (min-width: 760px) {
    #js-mouse {
        pointer-events: none;
        position: fixed;
        top: -11px;
        left: -11px;
        width: 22px;
        height: 22px;
        background: rgba(124, 58, 237, 0.25);
        border-radius: 50%;
        transform: translate(0, 0);
        transition: all 0.15s ease-out;
        z-index: 9999;
        opacity: 0;
    }
}

/* ===== Initial Area (Start Screen — redesign) ===== */
.ini_area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 60px 24px 52px;
    background: linear-gradient(160deg, #fffcf7 0%, #fdf6ff 45%, #f3f0ff 100%);
    overflow: hidden;
}

/* soft color hints — not glowy, just warm */
.ini_area::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 8%  20%, rgba(251,191,36,  0.10) 0%, transparent 38%),
        radial-gradient(ellipse at 92% 75%, rgba(6, 182,212,  0.08) 0%, transparent 38%),
        radial-gradient(ellipse at 50% 105%, rgba(244,63,94,  0.07) 0%, transparent 35%);
    pointer-events: none;
}

/* polka-dot texture — playful, not tech */
.ini_area::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(124,58,237,0.07) 1.5px, transparent 1.5px);
    background-size: 28px 28px;
    pointer-events: none;
}

.ini_content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    text-align: center;
}

/* ── Header text ── */
.ini_header {
    margin-bottom: 40px;
    animation: iniHeaderIn 0.7s ease-out both;
}
@keyframes iniHeaderIn {
    from { opacity: 0; transform: translateY(-18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ini_badge {
    display: inline-block;
    padding: 5px 18px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff !important;
    font-family: 'Alegreya Sans SC', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    border-radius: var(--radius-pill);
    margin-bottom: 20px;
    text-transform: uppercase;
    box-shadow: var(--shadow-pop-sm);
}

.ini_title {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 56px;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.ini_sub {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* ── PC Fan Layout ── */
.ini_fan {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 14px;
    padding: 10px 20px 0;
    margin-bottom: 40px;
    height: 210px;
}

.ini_fan_card {
    flex: 0 0 auto;
    width: 110px;
    cursor: default;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ini_fan_card:nth-child(1) { transform: rotate(-12deg) translateY(36px); z-index: 1; }
.ini_fan_card:nth-child(2) { transform: rotate(-6deg)  translateY(8px);  z-index: 2; }
.ini_fan_card:nth-child(3) { transform: rotate(-2deg)  translateY(2px);  z-index: 3; }
.ini_fan_card:nth-child(4) { transform: rotate(2deg)   translateY(2px);  z-index: 3; }
.ini_fan_card:nth-child(5) { transform: rotate(6deg)   translateY(8px);  z-index: 2; }
.ini_fan_card:nth-child(6) { transform: rotate(12deg)  translateY(36px); z-index: 1; }

.ini_fan_card:hover {
    transform: rotate(0deg) translateY(-16px) scale(1.06) !important;
    z-index: 10 !important;
}

/* ── Infinite Carousel (mobile only) ── */
.ini_carousel {
    display: none;
    width: 100%;
    overflow: hidden;
    margin-bottom: 40px;
    padding: 16px 0 24px;
    /* edge fade */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image:         linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.ini_carousel_track {
    display: flex;
    gap: 14px;
    width: max-content;
    animation: marquee 22s linear infinite;
}
.ini_carousel_track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ini_card {
    flex: 0 0 auto;
    width: 128px;
    position: relative;
    cursor: default;
}

.ini_card_inner {
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.13), 0 2px 6px rgba(0,0,0,0.07);
    border: 2px solid rgba(255,255,255,0.75);
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ini_card:hover .ini_card_inner {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 16px 32px rgba(0,0,0,0.18), 0 0 0 2.5px var(--cc, var(--primary));
    z-index: 10;
}

.ini_card_inner img {
    display: block;
    width: 100%;
    height: auto;
    flex: 1;
}

/* Type-color footer strip */
.ini_card_footer {
    background: var(--cc, var(--primary));
    color: #fff !important;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    padding: 7px 4px 8px;
    letter-spacing: 0.04em;
    line-height: 1;
    position: relative;
    flex-shrink: 0;
}
.ini_card_footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: rgba(255,255,255,0.35);
}

/* ── Bottom (chips + button) ── */
.ini_bottom {
    animation: iniHeaderIn 0.6s ease-out 0.55s both;
}

/* Stat chips */
.stat-chips {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0 0 24px;
    flex-wrap: wrap;
}
.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f5f3ff;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mid);
    border: 1px solid rgba(124, 58, 237, 0.1);
}
.stat-chip .emoji { font-size: 16px; }
.ini_chip {
    background: rgba(255,255,255,0.75);
    border-color: rgba(124,58,237,0.15);
    color: var(--text-mid);
    backdrop-filter: blur(8px);
}

/* ===== Start Button ===== */
.btn_area {
    max-width: 340px;
    margin: 28px auto 0;
}

.start-btn {
    display: block;
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    color: #fff !important;
    font-family: 'Alegreya Sans SC', 'Zen Kaku Gothic New', sans-serif;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 6px 0 #4c1d95,
        0 8px 20px rgba(124, 58, 237, 0.3);
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 0 #4c1d95,
        0 12px 30px rgba(124, 58, 237, 0.4);
}

.start-btn:active {
    transform: translateY(4px);
    box-shadow:
        0 2px 0 #4c1d95,
        0 4px 10px rgba(124, 58, 237, 0.3);
}

.start-btn .btn-sparkle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.start-btn .btn-label {
    position: relative;
    z-index: 1;
}

.free-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--yellow);
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-pill);
    margin-right: 8px;
    vertical-align: middle;
}

/* ===== Question Area ===== */
.q_area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

/* Progress Bar */
.progress-wrapper {
    width: 100%;
    max-width: 600px;
    margin-bottom: 32px;
    animation: fadeDown 0.5s ease-out;
}

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

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-mid);
}

.progress-count {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-pill);
    overflow: hidden;
    border: 2px solid rgba(124, 58, 237, 0.1);
    backdrop-filter: blur(8px);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--yellow));
    background-size: 200% 100%;
    border-radius: var(--radius-pill);
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: shimmer 2s ease infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Question Card */
.q_area .question {
    margin: 0 auto;
    padding: 44px 40px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    max-width: 600px;
    width: 100%;
    display: none;
    border: 2px solid rgba(124, 58, 237, 0.1);
    box-shadow:
        0 20px 60px rgba(124, 58, 237, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.q_area .question::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius) var(--radius) 0 0;
}
.q_area #question1::before { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.q_area #question2::before { background: linear-gradient(90deg, var(--secondary), var(--orange)); }
.q_area #question3::before { background: linear-gradient(90deg, var(--yellow), var(--green)); }
.q_area #question4::before { background: linear-gradient(90deg, var(--accent), var(--primary)); }
.q_area #question5::before { background: linear-gradient(90deg, var(--pink), var(--secondary)); }
.q_area #question6::before { background: linear-gradient(90deg, var(--green), var(--accent)); }
.q_area #question7::before { background: linear-gradient(90deg, var(--orange), var(--yellow)); }
.q_area #question8::before { background: linear-gradient(90deg, var(--primary), var(--pink)); }

/* Question number badge */
.q-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff !important;
    font-family: 'Alegreya Sans SC', sans-serif;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 16px;
    box-shadow: var(--shadow-pop-sm);
}

.q_area .question .tl {
    margin-bottom: 28px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.6;
}

.q_area .question.active {
    display: block;
    animation: cardBounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Answer Choices */
.q_set {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 18px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    background: #fff !important;
    cursor: pointer;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(124, 58, 237, 0.12);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.q_set::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(244, 63, 94, 0.05));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.q_set:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow:
        0 4px 0 rgba(124, 58, 237, 0.2),
        0 8px 20px rgba(124, 58, 237, 0.1);
}

.q_set:hover::before {
    opacity: 1;
}

.q_set:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 rgba(124, 58, 237, 0.2);
}

.q_set .choice-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff !important;
    font-family: 'Alegreya Sans SC', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border-radius: 50%;
}

.q_set .choice-text {
    position: relative;
    z-index: 1;
}

.q_set input[type="radio"] {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

/* ===== Animations ===== */
@keyframes cardBounceIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeRightAnime {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* ===== Result Page ===== */
.result-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 0;
    position: relative;
    z-index: 1;
}

.result-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    border: 2px solid rgba(124, 58, 237, 0.15);
    box-shadow:
        0 20px 60px rgba(124, 58, 237, 0.12),
        0 4px 20px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    width: 100%;
    overflow: hidden;
    animation: cardBounceIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-card-header {
    padding: 32px 40px 24px;
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    color: #fff !important;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: float 6s ease-in-out infinite;
}

.result-badge {
    display: inline-block;
    padding: 6px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    border-radius: var(--radius-pill);
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.result-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff !important;
}

.result-name {
    font-family: 'Alegreya Sans SC', 'Zen Kaku Gothic New', sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.result-card-body {
    padding: 36px 40px;
}

.result-description {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-mid);
    margin-bottom: 24px;
    padding: 20px;
    background: #f5f3ff;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
}

.result-catchphrase {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #fff5f7, #fef3c7);
    border-radius: var(--radius-sm);
    margin-bottom: 28px;
    border: 2px dashed rgba(244, 63, 94, 0.2);
    line-height: 1.7;
}

/* Character type colors */
.result-card.type01 .result-card-header { background: linear-gradient(135deg, #f97316, #c2410c); }
.result-card.type02 .result-card-header { background: linear-gradient(135deg, #22c55e, #15803d); }
.result-card.type03 .result-card-header { background: linear-gradient(135deg, #dc2626, #991b1b); }
.result-card.type04 .result-card-header { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.result-card.type05 .result-card-header { background: linear-gradient(135deg, #eab308, #a16207); }
.result-card.type06 .result-card-header { background: linear-gradient(135deg, #a855f7, #7c3aed); }

/* Score Bar */
.score-section {
    margin-bottom: 28px;
}

.score-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.score-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-bar-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-mid);
    width: 120px;
    min-width: 120px;
    text-align: right;
    flex-shrink: 0;
}

.score-bar-percent {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mid);
    width: 40px;
    min-width: 40px;
    text-align: right;
    flex-shrink: 0;
}

.score-bar-track {
    flex: 1;
    height: 8px;
    background: #ede9fe;
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: barGrow 1s ease-out forwards;
}

@keyframes barGrow {
    from { width: 0 !important; }
}

.score-bar-fill.color-1 { background: linear-gradient(90deg, #f97316, #fdba74); }
.score-bar-fill.color-2 { background: linear-gradient(90deg, #22c55e, #86efac); }
.score-bar-fill.color-3 { background: linear-gradient(90deg, #dc2626, #f87171); }
.score-bar-fill.color-4 { background: linear-gradient(90deg, #06b6d4, #67e8f9); }
.score-bar-fill.color-5 { background: linear-gradient(90deg, #eab308, #fde047); }
.score-bar-fill.color-6 { background: linear-gradient(90deg, #a855f7, #d8b4fe); }

/* Result Actions */
.result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.retry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 320px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    color: #fff !important;
    font-family: 'Alegreya Sans SC', 'Zen Kaku Gothic New', sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    box-shadow:
        0 4px 0 #4c1d95,
        0 6px 16px rgba(124, 58, 237, 0.3);
    transition: all 0.2s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 0 #4c1d95,
        0 10px 24px rgba(124, 58, 237, 0.4);
}

.retry-btn:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 #4c1d95,
        0 4px 8px rgba(124, 58, 237, 0.3);
}

.share-hint {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
}

/* Result bottom actions (after CTA) */
.result-actions-bottom {
    display: flex;
    justify-content: center;
    padding: 0 20px 60px;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Advice Section ===== */
.advice-section {
    max-width: 600px;
    width: 100%;
    margin: 32px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.ai-note {
    text-align: center;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 16px;
    opacity: 0.7;
}

.advice-header {
    text-align: center;
    margin-bottom: 28px;
}

.advice-header-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
    animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

.advice-header-title {
    font-family: 'Alegreya Sans SC', 'Zen Kaku Gothic New', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.advice-header-sub {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
}

/* Advice Card */
.advice-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    border: 2px solid rgba(124, 58, 237, 0.1);
    box-shadow:
        0 10px 40px rgba(124, 58, 237, 0.06),
        0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 32px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.advice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

/* Label badges */
.advice-card-label {
    display: inline-block;
    padding: 4px 14px;
    font-family: 'Alegreya Sans SC', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    border-radius: var(--radius-pill);
    margin-bottom: 12px;
}

.tips-label {
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
    color: var(--primary);
}

.mistake-label {
    background: linear-gradient(135deg, #fef3c7, #fce7f3);
    color: #b45309;
}

.risk-label {
    background: linear-gradient(135deg, #fee2e2, #fce7f3);
    color: #dc2626;
}

/* Card type accent lines */
.advice-card:first-of-type::before {
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.mistake-card::before {
    background: linear-gradient(90deg, var(--yellow), var(--orange));
}

.risk-card::before {
    background: linear-gradient(90deg, var(--secondary), #ef4444);
}

.advice-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

/* Tips list */
.advice-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.advice-list-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-mid);
    font-weight: 500;
}

.advice-list-icon {
    flex-shrink: 0;
    font-size: 18px;
    margin-top: 2px;
}

/* Callout boxes */
.advice-callout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.8;
    font-weight: 500;
}

.advice-callout p {
    margin: 0;
    color: var(--text-mid);
}

.advice-callout-icon {
    flex-shrink: 0;
    font-size: 28px;
    margin-top: -2px;
}

.mistake-callout {
    background: linear-gradient(135deg, #fffbeb, #fef9e7);
    border: 1px dashed rgba(180, 83, 9, 0.2);
}

.risk-callout {
    background: linear-gradient(135deg, #fef2f2, #fff1f2);
    border: 1px dashed rgba(220, 38, 38, 0.2);
}

/* ===== CTA Section ===== */
.cta-section {
    max-width: 600px;
    width: 100%;
    margin: 36px auto 0;
    padding: 0 20px 32px;
    position: relative;
    z-index: 1;
}

.cta-inner {
    background: #fff !important;
    border-radius: var(--radius);
    border: 3px solid var(--primary);
    box-shadow:
        0 20px 60px rgba(124, 58, 237, 0.12),
        0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 40px 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--yellow), var(--green));
}

.cta-lead {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.cta-title {
    font-family: 'Alegreya Sans SC', 'Zen Kaku Gothic New', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 16px;
}

.cta-description {
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: 28px;
}

.cta-description strong {
    color: var(--primary);
    font-weight: 700;
}

/* CTA feature points */
.cta-points {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.cta-point {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f5f3ff;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(124, 58, 237, 0.08);
    flex: 1;
    min-width: 140px;
}

.cta-point-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.cta-point-text {
    text-align: left;
}

.cta-point-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.cta-point-text span {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 600;
}

/* CTA Button */
.cta-btn-area {
    margin-bottom: 12px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 380px;
    padding: 20px 36px;
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: #fff !important;
    font-family: 'Alegreya Sans SC', 'Zen Kaku Gothic New', sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    box-shadow:
        0 6px 0 #9f1239,
        0 8px 24px rgba(244, 63, 94, 0.35);
    transition: all 0.2s ease;
    letter-spacing: 0.03em;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 0 #9f1239,
        0 12px 32px rgba(244, 63, 94, 0.45);
}

.cta-btn:active {
    transform: translateY(4px);
    box-shadow:
        0 2px 0 #9f1239,
        0 4px 10px rgba(244, 63, 94, 0.3);
}

.cta-btn-label {
    position: relative;
    z-index: 1;
}

.cta-btn-arrow {
    font-size: 20px;
    transition: transform 0.2s ease;
}

.cta-btn:hover .cta-btn-arrow {
    transform: translateX(4px);
}

.cta-note {
    font-size: 12px;
    color: var(--text-light);
}

/* Confetti container */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ===== Responsive ===== */
@media screen and (max-width: 760px) {
    .ini_area {
        padding: 24px 16px;
        min-height: 100dvh;
    }

    .ini_area {
        padding: 48px 16px 40px;
    }

    .ini_title {
        font-size: 36px;
    }

    .ini_sub {
        font-size: 13px;
    }

    .ini_fan { display: none; }
    .ini_carousel { display: block; }

    .ini_card {
        width: 100px;
    }
    .ini_card_footer {
        font-size: 10px;
        padding: 6px 3px 7px;
    }

    .stat-chips {
        gap: 8px;
    }

    .stat-chip {
        padding: 6px 12px;
        font-size: 12px;
    }

    .start-btn {
        font-size: 18px;
        padding: 16px 28px;
    }

    .q_area {
        padding: 24px 16px;
        min-height: 100dvh;
    }

    .q_area .question {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .q_area .question .tl {
        font-size: 17px;
    }

    .q_set {
        padding: 14px 18px;
        font-size: 14px;
    }

    .q_set .choice-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

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

    .result-name {
        font-size: 21px;
    }

    .result-card-body {
        padding: 28px 24px;
    }

    .result-description {
        font-size: 14px;
        padding: 16px;
    }

    .result-catchphrase {
        font-size: 16px;
        padding: 16px;
    }

    .catch_img img {
        max-width: 90%;
    }

    #wrapper::after {
        width: 150px;
        height: 150px;
        top: -50px;
        right: -50px;
    }

    .score-bar-label {
        width: 90px;
        min-width: 90px;
        font-size: 10px;
    }

    .score-bar-percent {
        width: 36px;
        min-width: 36px;
        font-size: 11px;
    }

    .advice-section {
        padding: 0 16px;
    }

    .advice-card {
        padding: 24px 20px;
    }

    .advice-header-title {
        font-size: 19px;
    }

    .advice-card-title {
        font-size: 16px;
    }

    .advice-list-item {
        font-size: 13px;
    }

    .advice-callout {
        padding: 16px;
        font-size: 13px;
        gap: 10px;
    }

    .advice-callout-icon {
        font-size: 24px;
    }

    .cta-section {
        padding: 0 16px 24px;
    }

    .cta-inner {
        padding: 32px 20px;
    }

    .cta-title {
        font-size: 19px;
    }

    .cta-description {
        font-size: 13px;
    }

    .cta-points {
        flex-direction: column;
        gap: 10px;
    }

    .cta-point {
        min-width: auto;
    }

    .cta-btn {
        font-size: 16px;
        padding: 18px 28px;
    }

    .result-actions-bottom {
        padding: 0 16px 48px;
    }
}

/* ===== Character Hero (result page) ===== */
.char-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px 32px 28px 28px;
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    color: #fff !important;
    position: relative;
    overflow: hidden;
}
.char-hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: float 6s ease-in-out infinite;
}

.char-hero-card {
    flex: 0 0 auto;
    width: 200px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 36px rgba(0,0,0,0.45), 0 0 0 3px rgba(255,255,255,0.25);
    position: relative;
    z-index: 1;
    animation: heroCardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}
@keyframes heroCardIn {
    from { opacity: 0; transform: translateX(-16px) scale(0.92); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
.char-hero-card img {
    display: block;
    width: 100%;
    height: auto;
}

.char-hero-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
    animation: heroInfoIn 0.5s ease-out 0.3s both;
}
@keyframes heroInfoIn {
    from { opacity: 0; transform: translateX(14px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Type-specific backgrounds */
.result-card.type01 .char-hero { background: linear-gradient(135deg, #f97316, #c2410c); }
.result-card.type02 .char-hero { background: linear-gradient(135deg, #22c55e, #15803d); }
.result-card.type03 .char-hero { background: linear-gradient(135deg, #dc2626, #991b1b); }
.result-card.type04 .char-hero { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.result-card.type05 .char-hero { background: linear-gradient(135deg, #eab308, #a16207); }
.result-card.type06 .char-hero { background: linear-gradient(135deg, #a855f7, #7c3aed); }

/* ===== Share Section ===== */
.share-section {
    text-align: center;
    padding: 48px 24px;
    max-width: 640px;
    margin: 0 auto;
}

.share-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 10px;
}

.share-title {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 20px;
}

.share-quote {
    display: none;
    background: var(--card-bg);
    border: 1px solid rgba(124,58,237,0.1);
    border-left: 4px solid var(--primary);
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mid);
    line-height: 1.9;
    text-align: left;
    margin-bottom: 28px;
}

.share-quote-tag {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    opacity: 0.7;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    letter-spacing: 0.02em;
    line-height: 1;
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

.share-btn--x    { background: #000;     color: #fff !important; }
.share-btn--x:hover { background: #222; }
.share-btn--fb   { background: #1877f2; color: #fff !important; }
.share-btn--fb:hover { background: #0d6fd8; }
.share-btn--line { background: #06c755; color: #fff !important; }
.share-btn--line:hover { background: #05b14c; }

@media screen and (max-width: 760px) {
    .share-section { padding: 36px 16px; }
    .share-btn { padding: 12px 18px; font-size: 13px; }
}

/* ===== Loading Overlay ===== */
#loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: linear-gradient(135deg, rgba(253,244,255,0.96) 0%, rgba(237,233,254,0.96) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
#loading-overlay.is-active {
    display: flex;
}

.loading-sparkles {
    position: fixed;
    inset: 0;
    pointer-events: none;
}
.loading-sparkle {
    position: absolute;
    color: var(--yellow);
    animation: sparkFloat 2.4s ease-in-out infinite;
}
.loading-sparkle:nth-child(1) { top: 12%; left: 8%;  font-size: 18px; animation-delay: 0s;    color: var(--yellow); }
.loading-sparkle:nth-child(2) { top: 18%; right: 10%; font-size: 13px; animation-delay: 0.5s;  color: var(--pink); }
.loading-sparkle:nth-child(3) { bottom: 18%; left: 12%; font-size: 20px; animation-delay: 1s; color: var(--accent); }
.loading-sparkle:nth-child(4) { top: 45%; left: 4%;  font-size: 12px; animation-delay: 0.7s;  color: var(--primary-light); }
.loading-sparkle:nth-child(5) { bottom: 12%; right: 8%; font-size: 16px; animation-delay: 1.4s; color: var(--secondary); }
.loading-sparkle:nth-child(6) { top: 55%; right: 5%; font-size: 11px; animation-delay: 0.3s;  color: var(--green); }
@keyframes sparkFloat {
    0%,100% { transform: translateY(0)    scale(1)   rotate(0deg);  opacity: 0.6; }
    50%      { transform: translateY(-20px) scale(1.3) rotate(22deg); opacity: 1;   }
}

.loading-inner {
    position: relative;
    text-align: center;
}

.loading-orb-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 28px;
}

.loading-ring {
    position: absolute;
    border-radius: 50%;
    border: 2.5px solid transparent;
    top: 50%;
    left: 50%;
}
.loading-ring--1 {
    width: 90px;  height: 90px;  margin: -45px 0 0 -45px;
    border-top-color: var(--primary);
    border-right-color: var(--primary-light);
    animation: spinCW 1s linear infinite;
}
.loading-ring--2 {
    width: 124px; height: 124px; margin: -62px 0 0 -62px;
    border-top-color: var(--secondary);
    border-left-color: var(--pink);
    animation: spinCCW 1.6s linear infinite;
}
.loading-ring--3 {
    width: 158px; height: 158px; margin: -79px 0 0 -79px;
    border-top-color: var(--accent);
    border-right-color: var(--yellow);
    animation: spinCW 2.3s linear infinite;
}
@keyframes spinCW  { to { transform: rotate(360deg);  } }
@keyframes spinCCW { to { transform: rotate(-360deg); } }

.loading-orb {
    position: absolute;
    top: 50%; left: 50%;
    width: 66px; height: 66px;
    margin: -33px 0 0 -33px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 0 32px rgba(124,58,237,.55), 0 0 64px rgba(244,63,94,.2);
    animation: orbPulse 1.6s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    line-height: 1;
}
@keyframes orbPulse {
    0%,100% { transform: scale(1);    box-shadow: 0 0 32px rgba(124,58,237,.55), 0 0 64px rgba(244,63,94,.2); }
    50%      { transform: scale(1.12); box-shadow: 0 0 56px rgba(124,58,237,.85), 0 0 110px rgba(244,63,94,.4); }
}

.loading-title {
    font-family: 'Alegreya Sans SC', 'Zen Kaku Gothic New', sans-serif;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 0.04em;
}
.loading-dots span {
    display: inline-block;
    animation: dotBounce 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.18s; }
.loading-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes dotBounce {
    0%,80%,100% { transform: translateY(0);    opacity: 0.4; }
    40%          { transform: translateY(-6px); opacity: 1;   }
}

.loading-sub {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.9;
}

/* ===== Utility ===== */
.pc { display: inline; }
@media screen and (max-width: 760px) {
    .pc { display: none; }
    .char-hero { flex-direction: column; align-items: center; text-align: center; gap: 20px; padding: 28px 20px; }
    .char-hero-card { width: 150px; }
    .char-hero-info { min-width: 0; width: 100%; }
}
