/* Pretendard Font */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* CSS Variables */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #131313;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #555555;
    --accent-primary: #ffffff;
    --accent-secondary: #888888;
    --accent-glow: rgba(255, 255, 255, 0.05);
    --border-color: #1e1e1e;
    --border-color-hover: #333333;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gradient-gold: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(255, 255, 255, 0.03);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    font-weight: 400;
    letter-spacing: -0.02em;
}

::selection {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Utility */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.screen {
    display: none;
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.6s ease;
}

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

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* ── INTRO ── */

#intro {
    position: relative;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
}

#intro.active { display: flex; }

.intro-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-primary);
    z-index: 0;
}

.intro-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.intro-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 500px;
}

.intro-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.6s ease-out 0s both;
}

.intro-title {
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.3;
    margin-bottom: 24px;
    color: var(--text-primary);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.intro-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    line-height: 1.8;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.intro-axes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* Axis items — static info, NOT interactive */
.axis-item {
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: left;
    cursor: default;
    user-select: none;
    pointer-events: none;
}

.axis-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 3px;
    letter-spacing: 0.02em;
}

.axis-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.btn-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    padding: 16px 32px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    color: #000;
    background: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.btn-start:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.08);
}

.btn-start:active { transform: translateY(0); }

.btn-start svg { transition: transform 0.3s ease; }
.btn-start:hover svg { transform: translateX(4px); }

.btn-types {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    padding: 14px 32px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 12px;
    animation: fadeInUp 0.6s ease-out 0.45s both;
}

.btn-types:hover {
    border-color: var(--border-color-hover);
    color: var(--text-secondary);
}

.intro-time {
    margin-top: 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

/* ── EXPLORE TYPES ── */

.explore-types {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.explore-types p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.btn-explore {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--accent-primary);
    background: transparent;
    border: 1px solid var(--accent-primary);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-explore:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* ── TEST SECTION ── */

#test {
    padding: 0;
    min-height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#test.active { display: flex; }
#test .container { width: 100%; }

.test-header { margin-bottom: 40px; }

.progress-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.progress-bar {
    flex: 1;
    height: 3px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 50px;
    text-align: right;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.question-container {
    text-align: center;
    padding: 40px 0;
    animation: fadeIn 0.35s ease;
}

.question-number {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.question-text {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 48px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    word-break: keep-all;
}

.answer-scale {
    max-width: 400px;
    margin: 0 auto;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

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

.scale-btn {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.scale-btn:hover {
    border-color: var(--border-color-hover);
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.scale-btn.selected {
    border-color: #fff;
    background: #fff;
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.1);
}

.test-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-nav:hover:not(:disabled) {
    border-color: var(--border-color-hover);
    color: var(--text-secondary);
}

.btn-nav:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.btn-next { background: var(--bg-tertiary); }

.btn-next:hover:not(:disabled) {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

/* ── RESULT SECTION ── */

#result { padding: 80px 0 40px; }

.result-header {
    text-align: center;
    padding-bottom: 60px;
    margin-bottom: 60px;
    border-bottom: 1px solid var(--border-color);
    animation: fadeInUp 0.8s ease-out;
}

.result-label {
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.result-type {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 600;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.result-name {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.result-philosophy {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-style: italic;
}

.borderline-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.borderline-icon { font-size: 1rem; }
.borderline-text { color: var(--text-secondary); }

.adjacent-type {
    color: var(--accent-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
}

.adjacent-type:hover {
    text-decoration-color: var(--accent-primary);
}

/* Spectrum */
.result-spectrum {
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease-out 0.15s both;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.spectrum-grid { display: grid; gap: 16px; }

.spectrum-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
}

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

.spectrum-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.spectrum-value {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.spectrum-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.spectrum-label-left,
.spectrum-label-right {
    font-size: 0.72rem;
    color: var(--text-muted);
    min-width: 32px;
}

.spectrum-label-right { text-align: right; }

.spectrum-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    position: relative;
    overflow: visible;
}

.spectrum-fill {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: 3px;
    transition: width 1s ease-out;
}

.spectrum-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: var(--accent-primary);
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    transition: left 1s ease-out;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

.spectrum-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Result Sections */
.result-section {
    margin-bottom: 48px;
    animation: fadeInUp 0.7s ease-out both;
}

.result-section:nth-child(3) { animation-delay: 0.2s; }
.result-section:nth-child(4) { animation-delay: 0.25s; }
.result-section:nth-child(5) { animation-delay: 0.3s; }
.result-section:nth-child(6) { animation-delay: 0.35s; }
.result-section:nth-child(7) { animation-delay: 0.4s; }
.result-section:nth-child(8) { animation-delay: 0.45s; }
.result-section:nth-child(9) { animation-delay: 0.5s; }
.result-section:nth-child(10) { animation-delay: 0.55s; }
.result-section:nth-child(11) { animation-delay: 0.6s; }
.result-section:nth-child(12) { animation-delay: 0.65s; }
.result-section:nth-child(13) { animation-delay: 0.7s; }

.type-description {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px;
}

.type-description p {
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.85;
    font-size: 0.95rem;
}

.type-description p:last-child { margin-bottom: 0; }

/* Strength & Weakness */
.strength-weakness {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sw-column {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}

.sw-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.strength-title { color: var(--success); }
.weakness-title { color: var(--danger); }

.sw-list { list-style: none; }

.sw-list li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    padding-left: 18px;
    line-height: 1.6;
}

.sw-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.strength-title + .sw-list li::before,
.sw-column:first-child .sw-list li::before { background: var(--success); }

.weakness-title + .sw-list li::before,
.sw-column:last-child .sw-list li::before { background: var(--danger); }

/* Compatibility */
.compatibility { display: grid; gap: 16px; }

.compat-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.compat-category-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.compat-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
}

.compat-item:last-child { padding-bottom: 0; }

.compat-icon {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
}

.compat-content h4 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.compat-type { color: var(--accent-primary); }

.compat-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Daily Patterns */
.daily-patterns { display: grid; gap: 12px; }

.pattern-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 22px;
}

.pattern-item h4 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.pattern-item p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Inner World */
.inner-world { display: grid; gap: 12px; }

.inner-world-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 22px;
}

.inner-world-item h4 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.03em;
}

.inner-world-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.inner-world-item.core-desire { border-left: 3px solid var(--success); }
.inner-world-item.core-fear { border-left: 3px solid var(--danger); }
.inner-world-item.inner-child { border-left: 3px solid #8b5cf6; }
.inner-world-item.shadow-side { border-left: 3px solid var(--warning); }
.inner-world-item.growth-path { border-left: 3px solid #3b82f6; }

/* Speech Patterns */
.speech-patterns {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}

.speech-phrases {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.speech-phrase {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 9px 16px;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-style: italic;
}

.speech-phrase::before { content: '\201C'; color: var(--text-muted); }
.speech-phrase::after { content: '\201D'; color: var(--text-muted); }

.speech-function {
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    line-height: 1.7;
}

.speech-function strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Famous People */
.famous-people {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.famous-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
}

.famous-category h4 {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.famous-category ul { list-style: none; }

.famous-category li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.famous-category li:last-child { border-bottom: none; }

.famous-category li strong {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.famous-category li span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Warning Signs */
.warning-signs {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}

.warning-signs h4 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--warning);
    margin-bottom: 16px;
}

.warning-signs ul { list-style: none; }

.warning-signs li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    line-height: 1.6;
}

.warning-signs li::before {
    content: '⚠';
    position: absolute;
    left: 0;
    color: var(--warning);
    font-size: 0.8rem;
}

.warning-danger {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.warning-danger h4 { color: var(--danger); }

.warning-danger li::before {
    content: '↓';
    color: var(--danger);
}

/* Recommendations */
.recommendations {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.rec-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
}

.rec-category h4 {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.rec-category ul { list-style: none; }

.rec-category li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.rec-category li:last-child { border-bottom: none; }

.rec-category li strong {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 2px;
}

.rec-category li span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.rec-category li .rec-desc {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.5;
}

/* Result Actions */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.btn-share,
.btn-retry {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-family: var(--font-main);
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-share {
    background: #fff;
    color: var(--bg-primary);
    border: none;
    font-weight: 500;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.08);
}

.btn-share:active { transform: translateY(0); }

.btn-retry {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-retry:hover {
    border-color: var(--border-color-hover);
    color: var(--text-secondary);
}

/* ── MODALS ── */

.share-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.share-modal.active { display: flex; }

.share-modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 400px;
    width: 100%;
    position: relative;
    animation: fadeInUp 0.3s ease-out;
}

.share-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.share-close:hover { color: var(--text-primary); }

.share-modal-content h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 24px;
    text-align: center;
}

.share-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    margin-bottom: 24px;
}

.share-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.share-type {
    font-size: 2rem;
    font-weight: 600;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.share-name {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.share-quote {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 16px;
}

.share-url {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.share-buttons { display: flex; gap: 10px; }

.share-btn {
    flex: 1;
    padding: 14px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.share-btn.twitter {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.share-btn.twitter:hover { background: #222; }

.share-btn.copy {
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-weight: 500;
}

.share-btn.copy:hover { opacity: 0.9; }

/* About Modal */
.about-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}

.about-modal.active { display: flex; }

.about-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.3s ease-out;
}

.about-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.about-content h2 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-text h3 {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 24px 0 12px;
}

.about-text ul {
    list-style: none;
    margin-bottom: 16px;
}

.about-text li {
    color: var(--text-secondary);
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 0.92rem;
}

.about-text li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.about-note {
    font-style: italic;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    margin-top: 24px;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.footer-link:hover {
    color: var(--text-primary);
    text-decoration-color: var(--text-muted);
}

.copyright {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.copyright p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.copyright-notice {
    font-size: 0.72rem !important;
    color: var(--text-muted);
    opacity: 0.6;
}

/* ── TYPES MODAL ── */

.types-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    overflow-y: auto;
    padding: 40px 20px;
}

.types-modal.active { display: block; }

.types-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    animation: fadeInUp 0.3s ease-out;
}

.types-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    transition: color 0.2s;
}

.types-close:hover { color: var(--text-primary); }

.types-content h2 {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
}

.types-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 36px;
}

.types-matrix {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.matrix-header {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.matrix-corner { /* empty */ }

.matrix-col-label {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.matrix-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.matrix-row:last-child { margin-bottom: 0; }

.matrix-row-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
}

.type-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
}

.group-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.group-1 { border-top: 2px solid #10b981; }
.group-2 { border-top: 2px solid #3b82f6; }
.group-3 { border-top: 2px solid #f59e0b; }
.group-4 { border-top: 2px solid #ef4444; }

.group-1 .group-label { color: #10b981; }
.group-2 .group-label { color: #3b82f6; }
.group-3 .group-label { color: #f59e0b; }
.group-4 .group-label { color: #ef4444; }

.type-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    margin-bottom: 5px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.type-card:last-child { margin-bottom: 0; }

.type-card:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color-hover);
}

.type-code {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-primary);
    padding: 3px 8px;
    border-radius: 4px;
    min-width: 36px;
    text-align: center;
}

.type-name {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.types-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-label {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* ── TYPE DETAIL MODAL ── */

.type-detail-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1001;
    overflow-y: auto;
    padding: 40px 20px;
}

.type-detail-modal.active { display: block; }

.type-detail-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    animation: fadeInUp 0.3s ease-out;
}

.type-detail-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
}

.type-detail-back {
    position: absolute;
    top: 22px;
    left: 24px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s;
}

.type-detail-back:hover { color: var(--text-primary); }

.type-detail-header {
    text-align: center;
    margin-bottom: 36px;
    padding-top: 16px;
}

.type-detail-header .type-code {
    font-size: 2.5rem;
    font-weight: 600;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 8px;
}

.type-detail-header .type-name {
    font-size: 1.4rem;
    color: var(--text-primary);
    display: block;
    margin-bottom: 12px;
}

.type-detail-header .type-philosophy {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
}

.type-detail-section { margin-bottom: 28px; }

.type-detail-section h3 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.type-detail-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 10px;
    font-size: 0.92rem;
}

.type-detail-section ul { list-style: none; }

.type-detail-section li {
    color: var(--text-secondary);
    padding: 5px 0;
    padding-left: 16px;
    position: relative;
    font-size: 0.9rem;
}

.type-detail-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* ── TOAST ── */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── RESPONSIVE ── */

@media (max-width: 768px) {
    .intro-axes { grid-template-columns: repeat(2, 1fr); }
    .strength-weakness { grid-template-columns: 1fr; }
    .famous-people, .recommendations { grid-template-columns: 1fr; }

    .scale-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .scale-buttons { gap: 8px; }
    .result-actions { flex-direction: column; }

    .btn-share, .btn-retry {
        width: 100%;
        justify-content: center;
    }

    .speech-phrases { flex-direction: column; }
    .speech-phrase { text-align: center; }

    .types-content { padding: 24px 16px; }
    .matrix-header { display: none; }

    .matrix-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .matrix-row-label {
        writing-mode: horizontal-tb;
        transform: none;
        padding: 10px 16px;
        font-size: 0.85rem;
        justify-content: flex-start;
    }

    .type-group { padding: 12px; }
    .type-detail-content { padding: 24px 16px; }

    .type-detail-back {
        position: static;
        display: block;
        margin-bottom: 16px;
    }

    .types-legend { gap: 12px; }
    .legend-item { font-size: 0.75rem; }
}

@media (max-width: 480px) {
    .intro-axes {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .axis-item { padding: 12px; }
    .axis-label { font-size: 0.75rem; }
    .axis-desc { font-size: 0.7rem; }
    .btn-start { width: 100%; justify-content: center; }
    .btn-types { width: 100%; }
    .question-text { font-size: 1.15rem; }

    .scale-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .scale-buttons { gap: 6px; }
}