:root {
    --em-bg: #f9f7f3;
    --em-card: #ffffff;
    --em-border: #d9d5cd;
    --em-ink: #2e2e2e;
    --em-accent: #4e4f73;
}

.emotions-page {
    padding-bottom: 80px;
}

/* ── Layout ── */
.wheel-layout {
    display: grid;
    grid-template-columns: minmax(300px, 540px) minmax(280px, 1fr);
    gap: 30px;
    margin-top: 28px;
    align-items: start;
}

/* ── Wheel ── */
.wheel-wrap {
    background: var(--em-card);
    border: 1px solid var(--em-border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

#emotionWheel {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    cursor: pointer;
}

.sector {
    cursor: pointer;
    transition: filter 0.15s, opacity 0.15s;
}

.sector:hover,
.sector.is-active {
    filter: brightness(1.15) drop-shadow(0 0 6px rgba(0,0,0,0.25));
}

.sector-label {
    font-family: sans-serif;
    pointer-events: none;
    user-select: none;
}

/* ── Info panel ── */
.emotion-info {
    background: var(--em-card);
    border: 1px solid var(--em-border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    position: sticky;
    top: 24px;
}

.info-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #9a9690;
    text-align: center;
    gap: 14px;
}

.info-icon {
    font-size: 2.5rem;
    opacity: 0.4;
}

.info-placeholder p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.is-hidden {
    display: none !important;
}

.info-color-bar {
    height: 6px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.info-name {
    margin: 0 0 4px;
    font-size: 1.8rem;
    color: var(--em-ink);
}

.info-group {
    font-size: 0.85rem;
    color: #808080;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.info-desc {
    margin: 0 0 18px;
    color: #4a4a4a;
    line-height: 1.6;
    font-size: 0.97rem;
}

.info-block {
    margin-bottom: 14px;
}

.info-block h3 {
    margin: 0 0 8px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #808080;
}

.info-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.info-chip {
    border: none;
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 0.88rem;
    cursor: pointer;
    transition: filter 0.12s;
    color: #fff;
}

.info-chip:hover {
    filter: brightness(1.15);
}

.info-chip.opposite {
    background: #888;
}

.info-function {
    margin: 0;
    font-size: 0.95rem;
    color: #4a4a4a;
    line-height: 1.5;
    font-style: italic;
}

/* ── Legend ── */
.wheel-legend {
    margin-top: 40px;
    background: var(--em-card);
    border: 1px solid var(--em-border);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

.wheel-legend h2 {
    margin: 0 0 12px;
    font-size: 1.3rem;
}

.wheel-legend p {
    color: #4a4a4a;
    line-height: 1.6;
    margin: 0 0 20px;
}

.legend-pairs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.legend-pair {
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-pair-name {
    font-weight: 700;
    font-size: 1rem;
}

.legend-pair-sub {
    font-size: 0.85rem;
    opacity: 0.8;
}

html[data-theme="dark"] .emotion-info,
html[data-theme="dark"] .wheel-legend {
    background: #171826;
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
    color: #F1F2F9;
}

html[data-theme="dark"] .wheel-wrap {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .info-placeholder {
    color: #B9BCE0;
}

html[data-theme="dark"] .info-icon {
    color: #F1F2F9;
    opacity: 0.55;
}

html[data-theme="dark"] .info-name,
html[data-theme="dark"] .wheel-legend h2,
html[data-theme="dark"] .legend-pair-name {
    color: #F1F2F9 !important;
}

html[data-theme="dark"] .info-group,
html[data-theme="dark"] .info-block h3 {
    color: #B9BCE0;
}

html[data-theme="dark"] .info-desc,
html[data-theme="dark"] .info-function,
html[data-theme="dark"] .wheel-legend p,
html[data-theme="dark"] .legend-pair-sub {
    color: #B9BCE0 !important;
}

html[data-theme="dark"] .legend-pair {
    border: 1px solid rgba(255, 255, 255, 0.14);
}

/* ── Responsive ── */
@media (max-width: 860px) {
    .wheel-layout {
        grid-template-columns: 1fr;
    }

    .emotion-info {
        position: static;
    }
}
