/* Night Sky's own look, after the shell every tool shares (../shell/shell.css: the brand, the name card, the score,
   the list down the left, the settings and their "i", the windows, the result, the phone layout, and the wide middle
   column every trainer has). Only this tool's subject goes here: the sky (one canvas, js/view.js, with a note and a
   hint laid over its corners), Explore's own controls under it (how the sky is seen, and when), a latitude question's
   scale, the cards that say what something is and how to find it, every lesson's chips, a lesson's cards, and the
   buttons under the board (the same sizes as Animal Tracks' and Dog Breeds' answers). Colours and fonts are the
   shell's variables; the sky's own inks are in view.js, taken from the same palette. */

.board {
  container-type: inline-size;
  flex: 1; min-height: 0; overflow: auto; box-sizing: border-box; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px;
  padding: 10px;
  background: #0b1219; border: 1px solid var(--line-strong); border-radius: 18px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.board .note { color: var(--muted); text-align: center; max-width: 56ch; line-height: 1.55; margin: 0; font-size: 13.5px; }
.board [hidden] { display: none !important; }

/* ---------- the sky ---------- */
.skywrap {
  position: relative; flex: none; width: 100%; height: clamp(300px, 50vh, 600px);
  border-radius: 12px; overflow: hidden; background: #070b12; border: 1px solid var(--line);
}
/* (a lesson's cards, or what to look for after an answer: the sky makes room, so they show without scrolling) */
.board.is-short .skywrap { height: clamp(260px, 40vh, 480px); }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#sky:active { cursor: grabbing; }
.skynote, .skyhint {
  position: absolute; inset-inline-start: 10px; max-width: calc(100% - 20px); box-sizing: border-box; pointer-events: none;
  font-size: 11.5px; line-height: 1.4; padding: 4px 9px; border-radius: 7px; background: rgba(7, 11, 18, 0.72);
}
.skynote { top: 10px; color: var(--bone); border: 1px solid rgba(236, 222, 194, 0.3); }
.skyhint { bottom: 10px; color: var(--muted); font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .04em; }
.skyhint:empty { display: none; }

/* ---------- Explore's own controls: the view, lines and names, tonight, and the month and hour ---------- */
.skybar { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; justify-content: center; width: 100%; }
.skybar .seg { flex: none; }
.skybar .seg button { padding: 6px 12px; }
.skybar .seg button:disabled { opacity: .4; cursor: default; }
.skybar .btn { padding: 7px 11px; }
.skybar .when, .scale { flex: 1 1 250px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.skybar .when input, .scale input { flex: 1; min-width: 0; accent-color: var(--scan); }
.skybar .when span, .scale span { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.skybar .when output, .scale output { min-width: 9ch; text-align: end; color: var(--fg); font-family: var(--f-mono); font-size: 12px; }
.scale { flex: none; width: min(100%, 560px); font-size: 13.5px; padding: 6px 4px; }
.scale output { font-size: 15px; font-weight: 600; color: var(--bone); min-width: 8ch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.panel .card-row output { min-width: 7ch; text-align: end; font-family: var(--f-mono); font-size: 12.5px; color: var(--fg); }

/* ---------- the cards that say what something is ---------- */
.under { display: grid; gap: 12px; width: 100%; justify-items: center; }
.under:empty { display: none; }
.feedback { display: grid; gap: 10px; width: 100%; }
@container (min-width: 600px) { .feedback.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cue { background: var(--bg-lift); border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; display: grid; gap: 7px; width: 100%; box-sizing: border-box; align-content: start; text-align: start; }
.cue-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.cue-head b { font-size: 16px; color: var(--bone); }
.cue-head .sci { font-size: 12.5px; color: var(--muted); font-style: normal; }
.cue p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--fg); text-wrap: pretty; }
.cue p em { font-style: normal; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--scan); }
.cue.rule { border-color: var(--line-strong); background: rgba(111, 208, 232, 0.06); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 5px 14px; margin: 3px 0 0; font-size: 13.5px; line-height: 1.45; }
.facts dt { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.facts dd { margin: 0; color: var(--fg); }

/* ---------- every lesson's chips (Explore), and the misses after a test ---------- */
.chart { display: grid; gap: 14px; min-width: 0; width: 100%; padding-top: 2px; }
.lgroup { display: grid; gap: 7px; }
.lgroup.is-later { opacity: .55; }
.ghead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--scan); }
.ghead em { font-style: normal; color: var(--muted); letter-spacing: 0; }
.ghead em.done { color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; color: var(--fg); cursor: pointer; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; }
.chip b { font-size: 13px; font-weight: 600; }
.chip:hover { border-color: var(--scan); }
.chip.is-on { border-color: var(--bone); box-shadow: 0 0 0 1px var(--bone); background: var(--bg-lift); }
.chip.is-known b::after { content: " ✓"; color: var(--ok); }
.chip.is-out { border-style: dashed; }
.chip.is-out b { color: var(--muted); }
.summary { display: grid; gap: 10px; justify-items: center; width: min(100%, 640px); }
.summary .chips { justify-content: center; }

/* ---------- a lesson's cards: each new thing; tap one to see it on the sky ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; width: 100%; }
.icard { cursor: pointer; padding: 11px 13px; }
.icard p { font-size: 13.5px; }
.icard:hover { border-color: var(--scan); }
.icard.is-on { border-color: var(--bone); box-shadow: 0 0 0 1px var(--bone); }

/* ---------- the buttons under the board: the answers (two by two, three by three for many) or a row of actions ---------- */
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; }
.actions:empty { display: none; }
.actions.row { display: flex; flex-wrap: wrap; justify-content: center; }
.actions.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.act {
  font: inherit; font-weight: 700; font-stretch: 102%; font-size: 15px; color: var(--fg); cursor: pointer; text-align: start;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 9px; padding: 11px 14px; min-height: 46px;
  display: flex; align-items: center; gap: 10px; position: relative; line-height: 1.2;
}
.act kbd { font-family: var(--f-mono); font-weight: 500; font-size: 10.5px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; flex: none; }
.act .txt { flex: 1; min-width: 0; }
.actions.row > .act { justify-content: center; text-align: center; flex: 0 1 auto; min-width: 120px; }
.act:hover:not(:disabled) { border-color: var(--scan); }
.act:disabled { opacity: .32; cursor: default; }
.act.primary { background: var(--bone); color: #1b1610; border-color: var(--bone); }
.act.primary kbd { color: #5d5345; border-color: #a99c84; }
.act.is-right { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok); opacity: 1; }
.act.is-wrong { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); opacity: 1; }
.actions:not(.row) > .act.primary { grid-column: 1 / -1; justify-self: center; justify-content: center; width: min(100%, 360px); }
.act.small { min-height: 34px; padding: 6px 12px; font-size: 13px; flex: none; }

@media (max-width: 900px) {
  .board { border-radius: 14px; gap: 10px; padding: 8px; }
  .skywrap { height: clamp(280px, 50vh, 460px); }
  .board.is-short .skywrap { height: clamp(210px, 31vh, 330px); }
  .act { padding: 9px 10px; font-size: 13.5px; min-height: 42px; }
  .act kbd { display: none; }
  .actions.row > .act { min-width: 0; flex: 1 1 0; }
  .cue { padding: 11px 13px; }
  .cue p { font-size: 13.5px; }
  .skybar .btn, .skybar .seg button { padding: 6px 9px; font-size: 12px; }
}
/* clean view: the sky takes the room the cards leave */
body.clean .skybar, body.clean .under { display: none; }
body.clean .skywrap { flex: 1 1 auto; height: auto; min-height: 300px; }
