﻿:root {
    color-scheme: light;
    --bg: #ffffff;
    --panel: #ffffff;
    --text: #20242a;
    --muted: #68707a;
    --line: #d9dee5;
    --accent: #4f6f9f;
    --accent-strong: #35557f;
    --danger: #a34444;
    --ok-bg: #eaf6ec;
    --ok-text: #2d6a36;
    --work-bg: #fff7df;
    --work-text: #725a10;
    --error-bg: #fdeaea;
    --error-text: #8a2f2f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic UI", "Yu Gothic", sans-serif;
    line-height: 1.55;
}

.page {
    width: min(1180px, calc(100% - 28px));
    margin: 24px auto 48px;
}

.page-header {
    margin-bottom: 18px;
}

    .page-header h1 {
        margin: 0 0 4px;
        font-size: 1.8rem;
    }

    .page-header p {
        margin: 0;
        color: var(--muted);
    }

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    margin: 14px 0;
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.04);
}

    .panel h2 {
        margin: 0 0 14px;
        font-size: 1.2rem;
    }

    .panel h3 {
        margin: 24px 0 10px;
        font-size: 1.05rem;
    }

.row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.wrap {
    flex-wrap: wrap;
}

.top-gap {
    margin-top: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

label, .field-info {
    display: grid;
    gap: 6px;
}

    label > span, .field-info > span {
        font-size: 0.88rem;
        color: var(--muted);
        font-weight: 600;
    }

input, select, button {
    font: inherit;
}

input, select {
    min-height: 40px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
}

button {
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
}

    button:hover:not(:disabled) {
        border-color: var(--accent);
    }

    button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    button.primary {
        background: var(--accent);
        color: white;
        border-color: var(--accent);
    }

        button.primary:hover:not(:disabled) {
            background: var(--accent-strong);
        }

    button.danger {
        color: var(--danger);
    }

.rule-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-left: 4px solid var(--accent);
    background: color-mix(in srgb, var(--accent) 7%, var(--panel));
    border-radius: 6px;
    font-size: 0.94rem;
}

.status {
    border-radius: 9px;
    padding: 11px 14px;
    margin: 14px 0;
    border: 1px solid var(--line);
    background: var(--panel);
}

    .status.info {
        color: var(--muted);
    }

    .status.ok {
        background: var(--ok-bg);
        color: var(--ok-text);
        border-color: transparent;
    }

    .status.working {
        background: var(--work-bg);
        color: var(--work-text);
        border-color: transparent;
    }

    .status.error {
        background: var(--error-bg);
        color: var(--error-text);
        border-color: transparent;
    }

.hidden {
    display: none !important;
}

.summary-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

    .summary-list > div {
        display: grid;
        grid-template-columns: 150px 1fr;
        gap: 10px;
    }

    .summary-list dt {
        color: var(--muted);
        font-weight: 600;
    }

    .summary-list dd {
        margin: 0;
    }

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
    font-size: 0.92rem;
}

th, td {
    border-bottom: 1px solid var(--line);
    padding: 9px 10px;
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-weight: 700;
}

.visual-meta {
    display: grid;
    gap: 5px;
    margin-bottom: 10px;
    font-size: 0.94rem;
}

.chart-wrap {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #e2e7ed;
    border-radius: 12px;
}

#planetChart {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
    background: #ffffff;
    border-radius: 8px;
}

.ring {
    fill: none;
    stroke: var(--line);
    stroke-width: 1.5;
}

.transit-ring {
    stroke-width: 2;
}

.natal-ring {
    stroke-dasharray: 4 5;
}

.chart-center {
    fill: var(--muted);
    opacity: 0.55;
}

.angle-line {
    stroke: var(--line);
    stroke-width: 1;
    opacity: 0.55;
}

.angle-label {
    fill: var(--muted);
    font-size: 11px;
    text-anchor: middle;
    dominant-baseline: middle;
}

.aspect {
    stroke-width: 3;
    opacity: 0.8;
}

.aspect-60 {
    stroke: #4c82c3;
}

.aspect-90 {
    stroke: #d85b55;
}

.aspect-120 {
    stroke: #55a36a;
}

.aspect-180 {
    stroke: #8b67b1;
}

.aspect-text {
    font-size: 12px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
}

.aspect-text-60 {
    fill: #4c82c3;
}

.aspect-text-90 {
    fill: #d85b55;
}

.aspect-text-120 {
    fill: #55a36a;
}

.aspect-text-180 {
    fill: #8b67b1;
}

.planet circle {
    fill: var(--panel);
    stroke: var(--text);
    stroke-width: 1.5;
}

.planet text {
    fill: var(--text);
    font-size: 13px;
    font-weight: 700;
    text-anchor: middle;
    pointer-events: none;
}

.natal-planet {
    opacity: 0.78;
}

.transit-planet circle {
    stroke-width: 2;
}

.planet-pluto circle {
    stroke: #8b67b1;
    stroke-width: 2.5;
}

.legend {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 720px) {
    .page {
        width: min(100% - 18px, 1180px);
        margin-top: 12px;
    }

    .panel {
        padding: 14px;
    }

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

    .summary-list > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

.house-line {
    stroke: #46556f;
    stroke-width: 1.1;
}

    .house-line.main-axis {
        stroke: #93a7c8;
        stroke-width: 2.1;
    }

.house-label {
    fill: #91a4c4;
    font-size: 12px;
    text-anchor: middle;
    dominant-baseline: middle;
}

.axis-label {
    fill: #d8e5ff;
    font-size: 14px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
}

.planet circle {
    transition: filter 0.08s ease, stroke-width 0.08s ease, opacity 0.08s ease;
}

.planet text {
    transition: fill 0.08s ease;
}

/* ============================================================
   Melody aspect colors - soft, distinct palette on white chart
   Visualization only; no astrological meaning.
   ============================================================ */

.aspect-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 12px;
}

.aspect-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 4px 9px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    background: color-mix(in srgb, currentColor 10%, transparent);
}

.aspect-key-0 {
    color: #FFB6A6;
}

.aspect-key-60 {
    color: #E6C96F;
}

.aspect-key-120 {
    color: #9BCEC1;
}

.aspect-key-180 {
    color: #67A2C5;
}

.aspect-key-240 {
    color: #A995D6;
}

.aspect-key-300 {
    color: #E6A3C5;
}

#lastSoundInfo.has-event-color {
    color: var(--last-event-color);
    font-weight: 700;
}

.planet circle {
    transition: filter 0.08s ease, stroke-width 0.08s ease, opacity 0.08s ease;
}

.planet text {
    transition: fill 0.08s ease;
}

.planet.is-sounding circle {
    stroke: var(--event-color, #FFB6A6);
    stroke-width: 2.6;
    filter: drop-shadow(0 0 7px var(--event-color, #FFB6A6));
}

.planet.is-hit circle {
    stroke: var(--event-color, #FFB6A6);
    stroke-width: 3.2;
    filter: drop-shadow(0 0 12px var(--event-color, #FFB6A6));
}

.planet.is-sounding text,
.planet.is-hit text {
    fill: var(--event-color, #FFB6A6);
}

/* Pluto structure markers. */
.aspect-60 {
    stroke: #4c82c3;
}

.aspect-90 {
    stroke: #d85b55;
}

.aspect-120 {
    stroke: #55a36a;
}

.aspect-180 {
    stroke: #8b67b1;
}

.aspect-text-60 {
    fill: #4c82c3;
}

.aspect-text-90 {
    fill: #d85b55;
}

.aspect-text-120 {
    fill: #55a36a;
}

.aspect-text-180 {
    fill: #8b67b1;
}

/* ============================================================
   The whole app uses a light theme.
   The chart is explicitly white so the aspect colors stay clear.
   ============================================================ */

#planetChart .ring {
    stroke: #cfd6df;
}

#planetChart .angle-line {
    stroke: #d9e0e7;
}

#planetChart .angle-label {
    fill: #697586;
}

#planetChart .chart-center {
    fill: #67717d;
}

#planetChart .planet circle {
    fill: #ffffff;
    stroke: #2f3945;
}

#planetChart .planet text {
    fill: #2f3945;
}

#planetChart .planet-pluto circle {
    stroke: #8b67b1;
}

#planetChart .house-line {
    stroke: #718096;
}

    #planetChart .house-line.main-axis {
        stroke: #40516a;
    }

#planetChart .house-label {
    fill: #56677e;
}

#planetChart .axis-label {
    fill: #28384d;
}

#planetChart .planet.is-sounding circle,
#planetChart .planet.is-hit circle {
    stroke: var(--event-color, #FFB6A6);
}

#planetChart .planet.is-sounding text,
#planetChart .planet.is-hit text {
    fill: var(--event-color, #FFB6A6);
}
