/* ==============================================================
   YOUR CONSTELLATION · page styles
   File: /your-constellation/your-constellation.css
   Colours, font and buttons come from site.css.
   The "How it helps" section uses shared styles (site.css, section 13).
   The sky's colours live in your-constellation.js (section 1).

   Sections:
     1  Layout and intro
     2  The night sky
     3  Controls
     4  Your constellations (the list)
   ============================================================== */


/* --------------------------------------------------------------
   1 · LAYOUT AND INTRO
   -------------------------------------------------------------- */
.skyroom {
  padding-block: clamp(1.5rem, 5vw, 3rem) clamp(3rem, 8vw, 5rem);
  background: linear-gradient(var(--c-sky-top), var(--bg));
}
.skyroom__intro { max-width: 46rem; margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.skyroom__title {
  margin-bottom: .35em;
  font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem);
  font-weight: var(--weight-light);
  letter-spacing: -.025em;
}
.skyroom__lede {
  font-size: var(--step-1);
  font-weight: var(--weight-light);
  line-height: 1.45;
}


/* --------------------------------------------------------------
   2 · THE NIGHT SKY (always night, whatever the page theme)
   -------------------------------------------------------------- */
.nightsky {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 74svh;
  margin-inline: auto;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0C1224;
}
@media (max-width: 700px) {
  .nightsky { aspect-ratio: 4 / 5; }
}
.nightsky canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nightsky canvas.is-over-star { cursor: pointer; }
.nightsky__tally {
  position: absolute;
  right: .9rem;
  top: .75rem;
  padding: .2rem .75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #EDE3CC;
  font-size: .85rem;
}
.nightsky__tally:empty { display: none; }


/* --------------------------------------------------------------
   3 · CONTROLS
   -------------------------------------------------------------- */
.star-panel {
  max-width: 44rem;
  margin: 1.5rem auto 0;
  padding: clamp(1.25rem, 4vw, 1.75rem);
  background: var(--surface);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
}
.star-panel__lead {
  display: block;
  margin-bottom: 1rem;
  font-size: var(--step-1);
  font-weight: var(--weight-light);
  line-height: 1.45;
}
.star-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.star-actions:first-child { margin-top: 0; }

.star-input {
  display: block;
  width: 100%;
  padding: .8rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
}
.star-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.star-prompts__label {
  margin: 1rem 0 .5rem;
  font-size: var(--step--1);
  color: var(--muted);
}
.star-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  appearance: none;
  min-height: 38px;
  padding: .35rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: var(--weight-regular) .92rem/1.2 var(--font-main);
  cursor: pointer;
}
.chip:hover { border-color: var(--text); }

.star-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.star-status {
  min-height: 1.65em;
  margin-top: 1rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .star-actions .btn { flex: 1 1 100%; }
}


/* --------------------------------------------------------------
   4 · YOUR CONSTELLATIONS
   -------------------------------------------------------------- */
.gratitudes {
  max-width: 44rem;
  margin: clamp(2rem, 5vw, 3rem) auto 0;
}
.gratitudes__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
}
.gratitudes__title { font-size: var(--step-2); }
.gratitudes__note { margin: .4rem 0 1rem; color: var(--muted); font-size: var(--step--1); }
.gratitudes__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.gratitudes__list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.gratitudes__name {
  flex: 1 1 auto;
  min-width: 0;
  padding: .2rem 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.gratitudes__name::before {
  content: "✦";
  margin-right: .55rem;
  color: #C9A45C;
}
.gratitudes__name:hover { text-decoration: underline; }
.gratitudes__date { color: var(--muted); font-size: var(--step--1); white-space: nowrap; }
.gratitudes__remove {
  flex: none;
  padding: .3rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}
.gratitudes__remove:hover,
.gratitudes__remove.is-armed { border-color: var(--danger); color: var(--danger); }
#wipe-btn.is-armed { border-color: var(--danger); color: var(--danger); }
