:root {
    color-scheme: light;
    --bg: #0c0b13;
    --bg-soft: #141320;
    --panel: #1b1a2b;
    --accent: #f4b4a6;
    --accent-strong: #f6d7b7;
    --muted: #9a94b0;
    --text: #f8f1ee;
    --text-soft: #d8d1e6;
    --line: rgba(255, 255, 255, 0.08);
    --glow: rgba(246, 215, 183, 0.45);
    --shadow: 0 30px 80px rgba(10, 8, 20, 0.55);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Space Grotesk", sans-serif;
    background: radial-gradient(circle at top, #1c1730 0%, #0c0b13 55%, #07060c 100%);
    color: var(--text);
    min-height: 100vh;
}

.page {
    padding: 48px clamp(20px, 4vw, 72px) 64px;
}

.topbar {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(240px, 1fr) minmax(220px, 1fr);
    align-items: center;
    margin-bottom: 40px;
}

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

.brand-mark {
    font-family: "Forum", serif;
    font-size: 32px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(246, 215, 183, 0.35), rgba(244, 180, 166, 0.8));
    color: #221a2e;
    box-shadow: 0 15px 40px rgba(246, 215, 183, 0.35);
}

.brand-title {
    font-family: "Forum", serif;
    font-size: 28px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 14px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.tagline {
    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.6;
    max-width: 420px;
    justify-self: end;
}

.layout {
    display: grid;
    gap: 32px;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr);
}

.panel {
    background: linear-gradient(150deg, rgba(32, 29, 51, 0.95), rgba(20, 19, 32, 0.92));
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 32px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.input-panel::before,
.output-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(246, 215, 183, 0.08), transparent 55%);
    pointer-events: none;
}

.input-panel h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.panel-lede {
    color: var(--muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

form {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
    font-size: 14px;
    color: var(--text-soft);
}

.field input,
.field select {
    background: var(--bg-soft);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--text);
    font-size: 15px;
}

.field small {
    color: var(--muted);
}

.cta {
    margin-top: 6px;
    background: linear-gradient(135deg, #f6d7b7, #f4b4a6);
    border: none;
    color: #231a2d;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 18px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 20px 40px rgba(246, 215, 183, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 55px rgba(246, 215, 183, 0.45);
}

.disclaimer {
    margin-top: 24px;
    font-size: 13px;
    color: var(--muted);
}

.idol-card {
    background: linear-gradient(135deg, rgba(246, 215, 183, 0.18), rgba(244, 180, 166, 0.15));
    border-radius: 22px;
    padding: 20px 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.idol-glow {
    position: absolute;
    inset: -40% 20% auto -10%;
    height: 180px;
    background: radial-gradient(circle, rgba(246, 215, 183, 0.55), transparent 70%);
    filter: blur(20px);
    opacity: 0.7;
}

.idol-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.idol-hand {
    width: 72px;
    height: 72px;
    position: relative;
}

.idol-hand .palm {
    position: absolute;
    width: 46px;
    height: 46px;
    background: rgba(248, 234, 214, 0.9);
    border-radius: 16px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: inset 0 0 10px rgba(123, 90, 76, 0.25);
}

.idol-hand .finger {
    position: absolute;
    width: 12px;
    background: rgba(248, 234, 214, 0.85);
    border-radius: 8px;
    top: 6px;
    box-shadow: inset 0 0 8px rgba(123, 90, 76, 0.2);
}

.idol-hand .f1 { height: 34px; left: 8px; }
.idol-hand .f2 { height: 42px; left: 22px; }
.idol-hand .f3 { height: 46px; left: 36px; }
.idol-hand .f4 { height: 38px; left: 50px; }
.idol-hand .f5 { height: 28px; left: 62px; transform: rotate(15deg); top: 20px; }

.idol-name {
    font-size: 20px;
    font-weight: 600;
}

.idol-role {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.idol-quote {
    margin-top: 14px;
    font-style: italic;
    color: var(--text-soft);
    position: relative;
    z-index: 1;
}

.result-card h2 {
    font-size: 24px;
    margin-bottom: 18px;
}

.pillars {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.pillar {
    background: rgba(8, 8, 16, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 14px 12px;
    text-align: center;
}

.pillar-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.pillar-stem {
    font-family: "Forum", serif;
    font-size: 20px;
    display: block;
    margin-top: 8px;
}

.pillar-branch {
    font-size: 14px;
    color: var(--text-soft);
}

.reading h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.reading p {
    line-height: 1.7;
    color: var(--text-soft);
}

.reading-meta {
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .topbar {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .tagline {
        justify-self: start;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .pillars {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
