:root {
    --bg: #0d0d14;
    --surface: #16161f;
    --surface2: #1e1e2e;
    --border: rgba(255, 255, 255, 0.07);
    --text: #e8e8f0;
    --muted: #7878a0;
    --accent: #7b61ff;
    --accent2: #ff6b9d;
    --accent3: #61d4ff;
    --star-color: #ffd166;
    --square-color: #61d4ff;
    --tri-color: #06d6a0;
    --circle-color: #ff6b9d;
    --cross-color: #c77dff;
    --moon-color: #ffb347;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: var(--bg);
    color: var(--text);
    font-family: "DM Sans", sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}
.orb1 {
    width: 100vw;
    height: 100vw;
    background: #06d6a0;
    top: -30vw;
    right: -20vw;
}
.orb2 {
    width: 100vw;
    height: 100vw;
    background: #ffd166;
    bottom: -30vw;
    left: -20vw;
}

/* Header */
#site-header {
    display: none;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 13, 20, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    text-align: center;
}
#site-header span {
    font-family: "DM Serif Display", serif;
    font-size: 22px;
    background: linear-gradient(135deg, var(--star-color), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#app {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px;
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Intro */
#intro {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}
#intro h1 {
    font-family: "DM Serif Display", serif;
    font-size: clamp(36px, 6vw, 60px);
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--star-color), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
#intro p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto 40px;
}
.btn-start {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #2196f3, #61d4ff);
    color: #fff;
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    font-weight: 600;
    padding: 16px 36px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 30px rgba(33, 150, 243, 0.4);
}
.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(33, 150, 243, 0.55);
}

/* Progress */
#progress-wrap {
    margin-top: 20px;
    margin-bottom: 40px;
    display: none;
}
.progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.progress-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}
.progress-count {
    font-size: 13px;
    color: #61d4ff;
    font-weight: 600;
}
.progress-bar {
    height: 3px;
    background: var(--border);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff3b30 0%, #ff9500 50%, #34c759 100%);
    background-size: 820px 100%;
    background-position: left center;
    background-repeat: no-repeat;
    border-radius: 100px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#prog-fill {
    width: 0%;
}

/* Question card */
.question-card {
    display: none;
    animation: fadeSlideIn 0.35s ease;
}
.question-card.active {
    display: block;
}
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.q-header {
    margin-bottom: 28px;
}
.q-number {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #61d4ff;
    margin-bottom: 8px;
}
.q-title {
    font-family: "DM Serif Display", serif;
    font-size: clamp(20px, 3vw, 26px);
    line-height: 1.3;
    color: var(--text);
}
.q-hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.q-hint svg {
    opacity: 0.6;
}

/* List labels */
.list-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 8px 4px;
}
.list-label span {
    font-size: 9px;
}
.list-label-top {
    color: #06d6a0;
    border-top: 1px solid rgba(6, 214, 160, 0.25);
    border-bottom: 1px dashed rgba(6, 214, 160, 0.15);
    margin-bottom: 6px;
}
.list-label-bottom {
    color: #ff6b9d;
    border-top: 1px dashed rgba(255, 107, 157, 0.15);
    border-bottom: 1px solid rgba(255, 107, 157, 0.25);
    margin-top: 6px;
    margin-bottom: 32px;
}

/* Drag list */
.drag-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0;
}
.drag-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: grab;
    transition: background 0.15s, border-color 0.15s, transform 0.15s,
        box-shadow 0.15s;
    user-select: none;
    position: relative;
}
.drag-item:hover {
    background: var(--surface2);
    border-color: rgba(123, 97, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.drag-item.dragging {
    opacity: 0.4;
    cursor: grabbing;
}
.drag-item.drag-over {
    border-color: var(--accent);
    background: rgba(123, 97, 255, 0.08);
    transform: scale(1.015);
    box-shadow: 0 0 0 2px rgba(123, 97, 255, 0.25);
}
.line-number {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    flex-shrink: 0;
    min-width: 18px;
    text-align: right;
}
.rank-badge {
    width: 48px;
    height: 28px;
    border-radius: 8px;
    background: var(--surface2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}
.drag-handle {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
    opacity: 0.3;
    transition: opacity 0.15s;
}
.drag-item:hover .drag-handle {
    opacity: 0.7;
}
.drag-handle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}
.drag-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
}
.sym-pill {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* Nav */
.q-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}
.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 13px 24px;
    border-radius: 100px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-prev {
    background: transparent;
    color: var(--muted);
}
.btn-prev:hover {
    background: var(--surface2);
    color: var(--text);
}
.btn-next {
    background: linear-gradient(135deg, #2196f3, #61d4ff);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.3);
}
.btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 30px rgba(33, 150, 243, 0.45);
}
.btn-finish {
    background: linear-gradient(135deg, #ffd166, var(--accent2));
    color: #0d0d14;
    border-color: transparent;
    box-shadow: 0 0 20px rgba(255, 209, 102, 0.3);
    font-weight: 700;
}
.btn-finish:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 30px rgba(255, 209, 102, 0.5);
}

/* Results */
#results {
    display: none;
    animation: fadeSlideIn 0.4s ease;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 30px 0 60px;
}
.results-header {
    text-align: center;
    margin-bottom: 48px;
}
.results-header h2 {
    font-family: "DM Serif Display", serif;
    font-size: clamp(30px, 5vw, 48px);
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--star-color), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.results-header p {
    color: var(--muted);
    font-size: 15px;
}
.breakdown-section {
    margin-bottom: 0;
}
.breakdown-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #61d4ff;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* Accordion */
.accordion {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 10px;
}
.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--surface);
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.accordion-trigger:hover,
.accordion.open .accordion-trigger {
    background: var(--surface2);
}
.accordion-sym {
    font-size: 22px;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}
.accordion-rank {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: var(--surface2);
    color: var(--muted);
    flex-shrink: 0;
}
.accordion.rank1 .accordion-rank {
    background: rgba(255, 209, 102, 0.2);
    color: var(--star-color);
}
.accordion-title-wrap {
    flex: 1;
}
.accordion-profile {
    font-weight: 600;
    font-size: 15px;
}
.accordion-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}
.accordion-score {
    font-size: 18px;
    font-weight: 700;
    margin-right: 4px;
}
.accordion-arrow {
    font-size: 12px;
    color: var(--muted);
    transition: transform 0.25s;
    flex-shrink: 0;
}
.accordion.open .accordion-arrow {
    transform: rotate(180deg);
}
.accordion-body {
    display: none;
    padding: 0 20px 20px;
    background: var(--surface2);
}
.accordion.open .accordion-body {
    display: block;
}
.acc-bar-wrap {
    height: 4px;
    background: var(--border);
    border-radius: 100px;
    margin: 0 0 16px;
    overflow: hidden;
}
.acc-bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.acc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.acc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
}
.acc-card.full {
    grid-column: 1 / -1;
}
.acc-card-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.acc-card-content {
    font-size: 13px;
    line-height: 1.6;
}
.btn-restart {
    display: block;
    margin: 0 auto;
    background: linear-gradient(135deg, #2196f3, #61d4ff);
    color: #fff;
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.3);
}
.btn-restart:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 30px rgba(33, 150, 243, 0.45);
}
#restart-button {
    margin-top: 40px;
}

@media (max-width: 600px) {
    .acc-grid {
        grid-template-columns: 1fr;
    }
}

/* Charts grid */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
    width: 100%;
    min-width: 0;
}
.chart-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    min-width: 0;
    overflow: hidden;
}
.chart-card-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #61d4ff;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.chart-wrap {
    position: relative;
    height: 240px;
}
.profile-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.profile-bar-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.profile-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.profile-bar-name {
    font-size: 13px;
    font-weight: 600;
}
.profile-bar-score {
    font-size: 12px;
    color: var(--muted);
}
.profile-bar-track {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.profile-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 640px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    .chart-wrap {
        height: 180px;
    }
    .charts-grid canvas {
        max-width: 100% !important;
    }
}

/* Results hero */
.results-hero-block {
    text-align: center;
    margin-bottom: 48px;
    padding: 36px 28px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--surface);
}
.results-hero-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.results-hero-title {
    font-family: "DM Serif Display", serif;
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.1;
    margin-bottom: 14px;
}
.results-hero-desc {
    font-size: 15px;
    line-height: 1.75;
    color: var(--muted);
    max-width: 500px;
    margin: 0 auto 20px;
}
.results-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
}

/* Radar chart */
.radar-section {
    margin-bottom: 16px;
}
.radar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 24px;
}
.radar-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #61d4ff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.radar-wrap {
    position: relative;
    height: 340px;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    display: block;
}

/* Share section */
#share-section {
    display: none;
}

/* Footer */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 24px;
    font-size: 12px;
    flex-shrink: 0;
    color: var(--muted);
    letter-spacing: 0.05em;
}