/* The first-run flow is intentionally quieter than the app around it, but it
   still needs to feel like a place. A warm card, generous type, and the small
   curing mark make each setup choice feel connected to Sponge & Stone. */
.welcome-shell {
  position: relative;
  max-width: 47rem;
  margin: clamp(1.5rem, 7vh, 5rem) auto;
}

.welcome-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -5rem 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 13%, transparent), transparent 72%);
  pointer-events: none;
}

.welcome-card {
  overflow: hidden;
  background: color-mix(in srgb, var(--card) 96%, var(--wash));
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  box-shadow: 0 2rem 5rem -2.5rem color-mix(in srgb, var(--shadow) 35%, transparent),
    0 0.25rem 1rem color-mix(in srgb, var(--shadow) 6%, transparent);
}

/* The bar's background is opaque (the wash composited onto the card) so each
   step can wear it as a mask over the connector lines running behind. */
.welcome-progress {
  --progress-bg: color-mix(in srgb, var(--wash) 72%, color-mix(in srgb, var(--card) 96%, var(--wash)));
  padding: 1.25rem clamp(1.5rem, 6vw, 3.75rem);
  background: var(--progress-bg);
  border-bottom: 1px solid var(--line);
}

.welcome-progress ol {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.welcome-progress li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 600;
}

.welcome-progress li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%;
  right: -50%;
  height: 1px;
  background: var(--line);
}

.welcome-step {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 0.6rem;
  background: var(--progress-bg);
}

.welcome-progress li.is-current { color: var(--ink); }
.welcome-progress li.is-complete { color: var(--accent-deep); }

.welcome-step-number {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  font-size: 0.78rem;
}

.welcome-progress .is-current .welcome-step-number {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--accent) 14%, transparent);
}

.welcome-progress .is-complete .welcome-step-number {
  color: var(--accent-deep);
  background: var(--wash);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.welcome-content {
  padding: clamp(2rem, 6vw, 4rem);
}

.welcome-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.welcome-heading { margin-bottom: 2rem; }
.welcome-form .welcome-heading { margin-bottom: 0; }

.welcome-glyphs {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 1.1rem;
  letter-spacing: 0.3em;
}

.welcome-heading h1 {
  margin-bottom: 0.25rem;
  font-size: clamp(2.1rem, 6vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.welcome-heading p {
  max-width: 36rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2.4vw, 1.22rem);
  line-height: 1.6;
}

.welcome-field .form-label {
  margin-bottom: 0.65rem;
  font-size: 1.05rem;
}

.welcome-field .form-control {
  border-radius: 0.85rem;
  padding: 0.8rem 1rem;
  font-size: 1.1rem;
}

/* The reef: one control wearing three handles. Drag the water, pop a bubble,
   or ride the slider; the sponge drinks whatever hue results. */
.welcome-reef {
  --reef-floor: color-mix(in srgb, var(--wash) 60%, var(--line));
  position: relative;
  overflow: hidden;
  /* The bottom band holds the slider; painted floor color so the seafloor
     runs seamlessly into it */
  padding-bottom: 3rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--wash) 45%, var(--card)),
    var(--wash) calc(100% - 3rem),
    var(--reef-floor) calc(100% - 3rem));
}

.reef-bubbles {
  position: absolute;
  top: 0.9rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0 0.75rem;
}

.reef-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 85%, transparent);
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.reef-bubble:hover { color: var(--ink); }

.reef-bubble .theme-swatch-dot {
  width: 1.1rem;
  height: 1.1rem;
  box-shadow: none;
}

/* A checked bubble's theme is the live accent, so the accent ring matches */
.reef-bubble:has(input:checked) {
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.welcome-reef .theme-hue-slider {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  width: auto;
  height: 1rem;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--card) 70%, transparent);
}

.welcome-reef .theme-hue-slider::-webkit-slider-thumb {
  width: 2.25rem;
  height: 2.25rem;
}

.welcome-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.welcome-actions .btn {
  min-width: 10.5rem;
  border-radius: 999px;
  padding-inline: 1.4rem;
}

.welcome-skip {
  color: var(--muted);
  font-size: 1rem;
  text-decoration: none;
}

.welcome-skip:hover { color: var(--ink); }

.welcome-passkey-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 34rem;
  margin: 1.75rem 0 2rem;
  padding: 1rem 1.1rem;
  color: var(--accent-deep);
  background: var(--wash);
  border-radius: 0.9rem;
  font-size: 1rem;
}

.welcome-passkey-note i { font-size: 1.15rem; }

/* Moments in a day: three shortcut cards and a full-width custom card, all
   feeding the one real time field. Exactly one card wears is-picked. */
.welcome-moments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.welcome-moment {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 1.15rem 0.75rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 1.1rem;
  background: var(--card);
  color: var(--muted);
  font-family: var(--display);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.welcome-moment svg {
  width: 2rem;
  height: 2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.welcome-moment-name {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 700;
}

.welcome-moment-time {
  font-size: 0.92rem;
  font-weight: 600;
}

.welcome-custom {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.9rem;
  padding: 0.9rem 1.25rem;
  border: 1.5px solid var(--line);
  border-radius: 1.1rem;
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.welcome-custom-copy {
  flex: 1;
  display: grid;
}

.welcome-custom-title {
  font-family: var(--display);
  font-weight: 700;
}

.welcome-custom-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.welcome-custom-time {
  border: 1.5px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.45rem 0.7rem;
  background: var(--card);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
}

.welcome-moment.is-picked,
.welcome-custom.is-picked {
  border-color: var(--accent);
  background: var(--wash);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--accent) 12%, transparent);
}

.welcome-moment.is-picked { color: var(--accent-deep); }

@media (max-width: 36rem) {
  .welcome-shell { margin-block: 0.75rem; }

  .welcome-progress {
    padding-inline: 1rem;
  }

  .welcome-progress li {
    font-size: 0.78rem;
  }

  .welcome-step {
    flex-direction: column;
    gap: 0.25rem;
    padding-inline: 0.35rem;
  }

  .welcome-progress li:not(:last-child)::after {
    top: 0.875rem;
    left: 50%;
    right: -50%;
  }

  .welcome-content { padding: 2rem 1.5rem 2.25rem; }

  .welcome-moments {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .welcome-moment {
    grid-template-columns: auto 1fr auto;
    justify-items: start;
    align-items: center;
    column-gap: 0.9rem;
    padding: 0.9rem 1.1rem;
  }

  .welcome-custom { flex-wrap: wrap; }

  .welcome-actions {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }
}
