/* ======================================================================
 *  天文星座连线认识 /tool/star-constellation-learn
 *  风格：深空夜航 —— 星空画布恒为夜色，页面外壳随主题切换
 * ====================================================================== */

.scl-page {
    --scl-ink: #cbd5f0;
    --scl-gold: #fbbf24;
    --scl-violet: #a78bfa;
    --scl-card: #ffffff;
    --scl-line: #e3e8f4;
    --scl-soft: #f3f5fb;
    --scl-text: #1d2440;
    --scl-muted: #6b7694;
    --scl-shadow: 0 12px 32px -16px rgba(59, 53, 130, .30);
    --sky-1: #050915;
    --sky-2: #0b1230;
    color: var(--scl-text);
    padding-bottom: 70px;
    background:
        radial-gradient(860px 380px at 12% -8%, rgba(124, 92, 255, .12), transparent 60%),
        radial-gradient(700px 340px at 90% 0%, rgba(59, 130, 246, .10), transparent 55%);
}
:root[data-theme="dark"] .scl-page {
    --scl-card: #121a2e;
    --scl-line: #26324e;
    --scl-soft: #17203a;
    --scl-text: #e6ebf8;
    --scl-muted: #8b97b5;
    --scl-shadow: 0 14px 34px -18px rgba(0, 0, 0, .75);
}

/* ---------- 面包屑 ---------- */
.scl-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--scl-muted);
    padding: 18px 0 0;
}
.scl-crumb a { color: var(--scl-muted); text-decoration: none; }
.scl-crumb a:hover { color: var(--scl-violet); }
.scl-crumb b { color: var(--scl-text); font-weight: 600; }

/* ---------- Hero ---------- */
.scl-hero { text-align: center; padding: 22px 0 26px; }
.scl-hero-ic {
    display: inline-grid;
    place-items: center;
    width: 62px;
    height: 62px;
    font-size: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e2a55, #101830);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--scl-gold) 30%, transparent), var(--scl-shadow);
    margin-bottom: 12px;
}
.scl-hero h1 {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 900;
    letter-spacing: -.02em;
    margin: 0 0 10px;
}
.scl-hero p {
    max-width: 580px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.8;
    color: var(--scl-muted);
}
.scl-hero em { font-style: normal; font-weight: 800; color: var(--scl-violet); }

/* ---------- 星座选择 ---------- */
.scl-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    margin-bottom: 20px;
}
.scl-tab {
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--scl-muted);
    background: var(--scl-card);
    border: 1.5px solid var(--scl-line);
    border-radius: 999px;
    padding: 9px 20px;
    cursor: pointer;
    transition: all .16s;
}
.scl-tab:hover { border-color: var(--scl-violet); color: var(--scl-violet); }
.scl-tab.is-on {
    color: #fff;
    background: linear-gradient(135deg, #7c5cff, #4f46e5);
    border-color: transparent;
    box-shadow: 0 6px 16px -6px #7c5cff;
}

/* ---------- 布局 ---------- */
.scl-layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 22px;
    align-items: start;
}

/* ---------- 星空画布（恒为夜色） ---------- */
.scl-sky-card {
    background: var(--scl-card);
    border: 1px solid var(--scl-line);
    border-radius: 20px;
    padding: 16px;
    box-shadow: var(--scl-shadow);
}
.scl-sky {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background:
        radial-gradient(420px 260px at 78% 18%, rgba(124, 92, 255, .16), transparent 65%),
        radial-gradient(380px 240px at 18% 76%, rgba(37, 99, 235, .14), transparent 60%),
        linear-gradient(160deg, var(--sky-2), var(--sky-1) 72%);
    cursor: crosshair;
}
/* 背景装饰星 */
.scl-sky-bg { position: absolute; inset: 0; pointer-events: none; }
.scl-star-d {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .75);
    animation: sclTwinkle 3.4s ease-in-out infinite;
}
.scl-star-d:nth-child(1)  { left: 8%;  top: 12%; animation-delay: 0s; }
.scl-star-d:nth-child(2)  { left: 22%; top: 78%; animation-delay: .5s; }
.scl-star-d:nth-child(3)  { left: 31%; top: 34%; animation-delay: 1.1s; width: 2px; height: 2px; }
.scl-star-d:nth-child(4)  { left: 44%; top: 8%;  animation-delay: .8s; }
.scl-star-d:nth-child(5)  { left: 55%; top: 60%; animation-delay: 1.6s; width: 2px; height: 2px; }
.scl-star-d:nth-child(6)  { left: 62%; top: 30%; animation-delay: .3s; }
.scl-star-d:nth-child(7)  { left: 74%; top: 82%; animation-delay: 1.9s; }
.scl-star-d:nth-child(8)  { left: 83%; top: 44%; animation-delay: .9s; width: 2px; height: 2px; }
.scl-star-d:nth-child(9)  { left: 92%; top: 16%; animation-delay: 1.4s; }
.scl-star-d:nth-child(10) { left: 15%; top: 46%; animation-delay: 2.2s; width: 2px; height: 2px; }
.scl-star-d:nth-child(11) { left: 68%; top: 64%; animation-delay: .6s; }
.scl-star-d:nth-child(12) { left: 38%; top: 88%; animation-delay: 1.7s; width: 2px; height: 2px; }
@keyframes sclTwinkle {
    0%, 100% { opacity: .25; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.25); }
}

#sclSvg { display: block; width: 100%; height: auto; }

.scl-line {
    stroke: var(--scl-gold);
    stroke-width: 2;
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, .55));
    animation: sclDraw .5s ease both;
}
@keyframes sclDraw { from { stroke-dasharray: 0 600; } to { stroke-dasharray: 600 0; } }

.scl-hit { fill: transparent; cursor: pointer; }
.scl-halo { fill: rgba(255, 255, 255, .10); transition: r .15s; }
.scl-dot {
    fill: #fff;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, .8));
    transition: fill .15s;
}
.scl-star { cursor: pointer; outline: none; }
.scl-star:hover .scl-halo, .scl-star:focus-visible .scl-halo { r: 18; }
.scl-star.is-lit .scl-dot { fill: var(--scl-gold); filter: drop-shadow(0 0 8px rgba(251, 191, 36, .9)); }
.scl-star.is-lit .scl-halo { fill: rgba(251, 191, 36, .16); }
.scl-star.is-plain { cursor: default; }
.scl-tag {
    fill: rgba(255, 255, 255, .55);
    font-size: 12px;
    font-family: inherit;
    pointer-events: none;
}
.scl-star.is-lit .scl-tag { opacity: 0; }
.scl-order {
    fill: #1d2440;
    font-size: 11px;
    font-weight: 900;
    text-anchor: middle;
    font-family: inherit;
    pointer-events: none;
}
.scl-sky-hint {
    position: absolute;
    left: 14px;
    bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
    background: rgba(5, 9, 21, .55);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    padding: 7px 15px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
}

/* ---------- 星空工具 ---------- */
.scl-sky-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.scl-tbtn {
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--scl-text);
    background: var(--scl-soft);
    border: 1px solid var(--scl-line);
    border-radius: 999px;
    padding: 8px 18px;
    cursor: pointer;
    transition: all .15s;
}
.scl-tbtn:hover { border-color: var(--scl-violet); color: var(--scl-violet); }
.scl-tbtn.is-quiz { color: var(--scl-gold); border-color: color-mix(in srgb, var(--scl-gold) 45%, transparent); }
.scl-tbtn.is-quiz:hover { color: #1d2440; background: var(--scl-gold); border-color: var(--scl-gold); }
.scl-tbtn.is-on { color: #1d2440; background: var(--scl-gold); border-color: var(--scl-gold); }
.scl-tbtn-sm { padding: 5px 14px; font-size: 12.5px; }
.scl-progress {
    margin: 12px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--scl-muted);
}

/* ---------- 故事面板 ---------- */
.scl-side { display: flex; flex-direction: column; gap: 16px; }
.scl-story {
    background: var(--scl-card);
    border: 1px solid var(--scl-line);
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: var(--scl-shadow);
    transition: border-color .3s;
}
.scl-story.is-unlocked { border-color: color-mix(in srgb, var(--scl-gold) 55%, transparent); }
.scl-story h2 { font-size: 19px; font-weight: 900; margin: 0 0 10px; }
.scl-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.scl-season, .scl-find {
    font-size: 12px;
    font-weight: 700;
    color: var(--scl-violet);
    background: color-mix(in srgb, var(--scl-violet) 10%, transparent);
    border-radius: 999px;
    padding: 4px 12px;
}
.scl-find { color: var(--scl-muted); background: var(--scl-soft); }
.scl-myth {
    margin: 0;
    font-size: 14px;
    line-height: 2;
    color: var(--scl-muted);
    transition: color .3s;
}
.scl-story.is-unlocked .scl-myth { color: var(--scl-text); }
.scl-facts ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.scl-facts li {
    font-size: 13px;
    line-height: 1.7;
    color: var(--scl-muted);
    padding-left: 20px;
    position: relative;
}
.scl-facts li::before { content: "⭐"; position: absolute; left: 0; font-size: 11px; }

/* ---------- 测验 ---------- */
.scl-quiz {
    background: linear-gradient(160deg, color-mix(in srgb, var(--scl-gold) 8%, var(--scl-card)), var(--scl-card));
    border: 1px solid color-mix(in srgb, var(--scl-gold) 40%, transparent);
    border-radius: 18px;
    padding: 20px 22px;
}
.scl-quiz h2 { font-size: 17px; font-weight: 900; margin: 0 0 14px; }
.scl-quiz-opts { display: grid; gap: 9px; }
.scl-opt {
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    text-align: left;
    color: var(--scl-text);
    background: var(--scl-card);
    border: 1.5px solid var(--scl-line);
    border-radius: 12px;
    padding: 11px 16px;
    cursor: pointer;
    transition: all .15s;
}
.scl-opt:hover:not(:disabled) { border-color: var(--scl-gold); transform: translateX(3px); }
.scl-opt.is-right { border-color: #16a34a; background: rgba(22, 163, 74, .10); }
.scl-opt.is-wrong { border-color: #ef4444; background: rgba(239, 68, 68, .08); }
.scl-quiz-msg { margin: 12px 0 0; font-size: 13.5px; line-height: 1.75; color: var(--scl-muted); min-height: 20px; }
.scl-quiz-score {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--scl-muted);
}
.scl-quiz-score b { color: var(--scl-gold); font-size: 15px; }
.scl-quiz-score .scl-tbtn { margin-left: auto; }

/* ---------- 底部：口径说明表（neo 体系） ---------- */
.neo-note-table { width: 100%; border-collapse: collapse; }
.neo-note-table th,
.neo-note-table td {
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--scl-line) 70%, transparent);
    font-size: 13.5px;
    line-height: 1.75;
    vertical-align: top;
}
.neo-note-table th {
    width: 104px;
    font-weight: 800;
    color: var(--scl-violet);
    white-space: nowrap;
}
.neo-note-table td { color: var(--scl-text); }
.neo-note-table td b { color: var(--scl-violet); }
.neo-usage { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.neo-usage li { font-size: 14px; line-height: 1.9; color: var(--scl-muted); }
.neo-usage li b { color: var(--scl-text); }

/* ---------- 指南 ---------- */
.scl-guide {
    margin-top: 30px;
    background: var(--scl-card);
    border: 1px solid var(--scl-line);
    border-radius: 18px;
    padding: 22px 26px;
    box-shadow: var(--scl-shadow);
}
.scl-guide h2 { font-size: 17px; font-weight: 900; margin: 0 0 13px; }
.scl-guide ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.scl-guide li {
    font-size: 14px;
    line-height: 1.85;
    color: var(--scl-muted);
    padding-left: 22px;
    position: relative;
}
.scl-guide li::before { content: "🌙"; position: absolute; left: 0; font-size: 12px; }
.scl-guide li b { color: var(--scl-text); }
.scl-note {
    margin: 14px 0 0;
    font-size: 12.5px;
    color: var(--scl-muted);
    font-style: italic;
}

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
    .scl-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .scl-sky-hint { font-size: 12px; left: 10px; bottom: 8px; }
}
