:root {
    --bg: #faf8ff;
    --bg-soft: #f0ecfa;
    --surface: #ffffff;
    --text: #2d2a35;
    --text-muted: #7a7585;
    --primary: #7c6cf0;
    --primary-light: #a594f9;
    --primary-soft: #ede9fe;
    --accent: #ff8fab;
    --accent-soft: #ffe4ec;
    --mint: #6ee7b7;
    --mint-soft: #d1fae5;
    --sky: #7dd3fc;
    --sky-soft: #e0f2fe;
    --sun: #fbbf24;
    --sun-soft: #fef3c7;
    --border: rgba(45, 42, 53, 0.07);
    --shadow: 0 4px 24px rgba(124, 108, 240, 0.08);
    --shadow-lg: 0 16px 48px rgba(124, 108, 240, 0.15);
    --radius: 20px;
    --radius-sm: 12px;
    --font: 'Plus Jakarta Sans', system-ui, sans-serif;
    --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button, textarea { font-family: var(--font); }
button { cursor: pointer; }

.container { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 20px; }

.cursor-glow {
    position: fixed;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 108, 240, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    opacity: 0;
}
@media (hover: hover) { .cursor-glow { opacity: 1; } }

.header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(250, 248, 255, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 12px;
}
.nav__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.05rem;
}
.nav__mark {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 6px 12px;
    border-radius: 100px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    transition: var(--transition);
}
.btn--sm { padding: 8px 16px; font-size: 0.82rem; }
.btn--primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 108, 240, 0.4);
}
.btn--primary:hover { transform: translateY(-2px); }
.btn--ghost {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
}
.btn--ghost:hover { border-color: var(--primary-light); color: var(--primary); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.app { position: relative; z-index: 1; padding: 28px 0 80px; min-height: calc(100vh - 140px); }

.screen { animation: fadeUp 0.35s ease both; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.hero-card, .q-card, .result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 28px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 8px 14px;
    border-radius: 100px;
    margin-bottom: 16px;
}
.badge-dot {
    width: 8px; height: 8px;
    background: var(--mint);
    border-radius: 50%;
}

h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 12px; }
h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; }
h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; }
.muted { color: var(--text-muted); }
.lead { color: var(--text-muted); margin-bottom: 20px; }

.note {
    background: var(--sun-soft);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 0.9rem;
    margin: 18px 0;
}
.note--warn {
    background: var(--accent-soft);
}

.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 24px; }
.chip {
    background: var(--bg-soft);
    border-radius: 100px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.scale-legend {
    display: grid;
    gap: 6px;
    margin: 16px 0 24px;
    font-size: 0.9rem;
}

.progress-wrap { margin-bottom: 18px; }
.progress-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.progress-bar {
    height: 8px;
    background: var(--bg-soft);
    border-radius: 100px;
    overflow: hidden;
}
.progress-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 100px;
    transition: width 0.3s ease;
}

.q-dim {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 10px;
}
.q-prompt { font-size: 1.15rem; font-weight: 700; line-height: 1.45; margin-bottom: 22px; }

.likert {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.likert button {
    border: 2px solid var(--border);
    background: #fff;
    border-radius: 14px;
    padding: 12px 6px;
    transition: var(--transition);
}
.likert button strong { display: block; font-size: 1.15rem; }
.likert button small { display: block; color: var(--text-muted); font-size: 0.68rem; line-height: 1.25; margin-top: 4px; }
.likert button:hover { border-color: var(--primary-light); transform: translateY(-2px); }
.likert button.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}

textarea {
    width: 100%;
    min-height: 140px;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    font-size: 1rem;
    resize: vertical;
    background: #fff;
    color: var(--text);
}
textarea:focus { outline: none; border-color: var(--primary); }

.nav-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
}

.result-grid { display: grid; gap: 16px; }
.result-card { padding: 24px; }
.result-card + .result-card { margin-top: 0; }

.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 48px; align-items: center; gap: 10px; }
.bar-name { font-size: 0.86rem; font-weight: 600; }
.bar-track { height: 10px; background: var(--bg-soft); border-radius: 100px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 100px; }
.bar-score { font-weight: 800; font-size: 0.9rem; text-align: right; }
.bar-low { background: #fb7185; }
.bar-mid { background: #fbbf24; }
.bar-ok { background: #60a5fa; }
.bar-hi { background: #34d399; }

.list { display: grid; gap: 10px; }
.item {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.item strong { display: block; margin-bottom: 4px; }

.safety {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: var(--radius);
    padding: 20px;
}

.footer {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

@media (max-width: 640px) {
    .hero-card, .q-card { padding: 22px 16px; }
    .likert { grid-template-columns: 1fr; }
    .likert button { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
    .likert button strong { font-size: 1rem; }
    .bar-row { grid-template-columns: 1fr 44px; }
    .bar-name { grid-column: 1 / -1; }
    .nav__mark { display: none; }
}
