/* Constellation Connect (/play/constellation-connect, ADR 0113), light theme;
   constellation-connect-dark.css overrides it for the dark theme. The chart is
   SVG drawn by web/src/play/constellation.ts on learn.css's night panel, in
   both themes; colors come from the cc-* classes because the
   Content-Security-Policy forbids style attributes. */

.cc-page {
  --cc-line: #ffd27a;
  --cc-right: #6fe3a8;
  --cc-wrong: #ff7d73;
  --cc-missed: #8fd8ff;
  --cc-guide: #b9c6ff;
}

.cc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 0 0 10px; }
.cc-head[hidden] { display: none; }
.cc-prompt { display: none; margin: 0; font-weight: 700; font-size: 1.05rem; }
.cc-modes { display: inline-flex; gap: 4px; }
.cc-modes .lx-btn { min-height: 30px; padding: 3px 10px; font-size: 0.8rem; }
.cc-actions .lx-btn, .cc-zoom .lx-btn, .cc-next .lx-btn { min-height: 40px; padding: 6px 16px; font-size: 0.92rem; }

.cc-chart { position: relative; }
.cc-svg { touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.cc-zoom { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; }
[dir="rtl"] .cc-zoom { right: auto; left: 10px; }
.cc-zoom .lx-btn { width: 40px; padding: 0; font-size: 1.2rem; line-height: 1; background: rgb(11 17 48 / 0.7); color: #e7ebfa; border-color: #3a4678; }

.cc-sky { fill: transparent; }
.cc-star { stroke: none; }
.cc-glow { stroke: none; opacity: 0.18; pointer-events: none; }
.cc-b0 { fill: #c9d8ff; }
.cc-b1 { fill: #eef2ff; }
.cc-b2 { fill: #fff6e6; }
.cc-b3 { fill: #ffe2b0; }
.cc-b4 { fill: #ffc58f; }
.cc-guide { stroke: var(--cc-guide); stroke-opacity: 0.32; stroke-width: 1.4; stroke-dasharray: 4 5; }
.cc-line { stroke: var(--cc-line); stroke-width: 2.6; stroke-linecap: round; }
.cc-rubber { stroke-opacity: 0.7; stroke-dasharray: 6 5; }
.cc-right { stroke: var(--cc-right); }
.cc-wrong { stroke: var(--cc-wrong); stroke-dasharray: 2 6; }
.cc-missed { stroke: var(--cc-missed); stroke-opacity: 0.85; stroke-dasharray: 9 6; stroke-width: 2; }
.cc-selected { fill: none; stroke: var(--cc-line); stroke-width: 2; }
.lx-night .cc-name { fill: #e7ebfa; font-size: 12.5px; paint-order: stroke; stroke: #0b1130; stroke-width: 3px; }
.lx-night .cc-picked { font-weight: 600; pointer-events: none; }

.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.cc-actions[hidden] { display: none; }
.cc-actions [data-cc-check] { margin-inline-start: auto; }

.cc-result { margin-top: 14px; }
.cc-result[hidden] { display: none; }
.cc-score { display: flex; align-items: baseline; gap: 12px; font-size: 1.25rem; margin: 0 0 6px; }
.cc-stars { color: var(--accent-sun); letter-spacing: 0.08em; font-size: 1.5rem; }
.cc-facts { margin: 0 0 10px; padding-inline-start: 1.2em; }
.cc-facts li + li { margin-top: 3px; }
.cc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: 0.88rem; margin: 0 0 12px; }
.cc-key { display: inline-block; width: 22px; height: 0; border-top: 3px solid; vertical-align: middle; margin-inline-end: -4px; }
.cc-key-right { border-color: #23a26a; }
.cc-key-wrong { border-color: #d9473d; border-top-style: dotted; }
.cc-key-missed { border-color: #2a8fc7; border-top-style: dashed; }
.cc-next { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0; }
.cc-next a.lx-btn { text-decoration: none; display: inline-flex; align-items: center; }

/* The level list: three chapters, a name and its best stars on each line. */
.cc-levels { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 4px 14px; }
.cc-levels a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; text-decoration: none; color: var(--text); }
.cc-levels a:hover, .cc-levels a:focus-visible { background: var(--accent-moon-soft); }
.cc-levels a[aria-current="page"] { background: var(--accent-moon-soft); font-weight: 650; }
.cc-level-stars { color: var(--accent-sun); white-space: nowrap; }
[data-cc-continue] { margin: 0 0 14px; }
[data-cc-continue] a { text-decoration: none; display: inline-flex; min-height: 40px; align-items: center; padding: 6px 18px; }

/* Full screen on a phone (the games stage): the bar names the game, the prompt the constellation. */
.game-stage.is-full > h2, .game-stage.is-full > .lx-nojs { display: none; }
.game-stage.is-full .cc-prompt { display: block; }
.game-stage.is-full .cc-chart figcaption { font-size: 0.8rem; }
.game-stage.is-full { border-radius: 0; box-shadow: none; border: 0; margin: 0; }
