/* Bedtime Challenge — extends ../style.css (same tokens, Nunito, dark night theme). */
::selection { background: rgba(169,156,255,.38); color: var(--text); }
input, select { caret-color: var(--accent); }

/* Tonight: the one big moment — your bedtime, set in large tabular numerals */
.bt-tonight { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 18px; box-shadow: var(--shadow); }
.bt-tonight-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bt-tonight-head h2 { font-size: 1.1rem; }
.bt-pick { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; font-weight: 700; }
.bt-select { font-weight: 900; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; min-height: 44px; cursor: pointer; font-variant-numeric: tabular-nums; }
.bt-clock { font-size: clamp(3.6rem, 19vw, 5.6rem); font-weight: 900; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 18px 0 8px; }
.bt-status { color: var(--muted); min-height: 2.9em; }
.bt-status.is-open { color: var(--accent-2); font-weight: 700; }
.bt-inbed { width: 100%; min-height: 58px; margin-top: 14px; font-size: 1.12rem; border-radius: 18px; }
.bt-inbed svg { width: 22px; height: 22px; flex: 0 0 22px; }
.bt-inbed:disabled { background: var(--surface-2); color: var(--muted); cursor: default; transform: none; filter: none; }
.bt-inbed.is-done:disabled { background: transparent; color: var(--accent-2); box-shadow: inset 0 0 0 1px rgba(111,201,193,.55); }

/* Streak */
.bt-streak { display: flex; gap: 32px; align-items: flex-end; }
.bt-num { display: flex; align-items: baseline; gap: 8px; }
.bt-num b { font-size: 2.8rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent-2); }
.bt-num.is-best b { color: var(--text); font-size: 2rem; }
.bt-num span { color: var(--muted); font-weight: 700; }
.bt-sub { font-size: .95rem; margin: 22px 0 10px; }

/* 30-night calendar (Monday-first weeks) */
.bt-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 380px; }
.bt-dow { text-align: center; color: var(--muted); font-size: .75rem; font-weight: 700; padding-bottom: 2px; }
.bt-cell { aspect-ratio: 1; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; }
.bt-cell.is-blank { background: transparent; }
.bt-cell.is-done { background: var(--accent); color: var(--accent-ink); }
.bt-cell.is-tonight { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-2); }
.bt-cell-n { font-size: .75rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.bt-cell.is-done .bt-cell-n { color: var(--accent-ink); }
.bt-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: .82rem; margin-top: 10px; }
.bt-key { width: 12px; height: 12px; border-radius: 4px; background: var(--surface-2); display: inline-block; }
.bt-key.is-done { background: var(--accent); }
.bt-legend .bt-key:not(:first-child) { margin-left: 10px; }
.bt-week { margin-top: 14px; font-weight: 700; }
.bt-week span { color: var(--muted); font-weight: 500; }

/* Wind-down */
.bt-wind { width: 100%; margin-top: 12px; }
.bt-wind.is-playing { background: transparent; box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.bt-remind { margin-top: 14px; }

/* Circle */
.bt-intro { color: var(--muted); margin-bottom: 12px; max-width: 60ch; }
.bt-invite { background: var(--surface); border: 1px solid rgba(169,156,255,.45); border-radius: var(--radius); padding: 16px; }
.bt-invite-t { font-weight: 900; font-size: 1.05rem; }
.bt-invite .row { margin-top: 12px; }
.bt-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bt-board li { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px 6px 8px 14px; min-height: 56px; }
.bt-board li.is-me { background: var(--surface-2); border-color: rgba(169,156,255,.4); }
.bt-rank { flex: 0 0 1.4em; color: var(--muted); font-weight: 900; font-variant-numeric: tabular-nums; }
.bt-who { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.bt-who b { font-weight: 900; overflow-wrap: anywhere; }
.bt-who small { color: var(--muted); font-weight: 700; font-size: .8rem; }
.bt-who .bt-best { flex-basis: 100%; font-weight: 500; }
.bt-score { font-size: 1.5rem; font-weight: 900; color: var(--accent-2); font-variant-numeric: tabular-nums; padding-right: 8px; }
.bt-board .icon-btn { flex: 0 0 44px; align-self: stretch; border-radius: 12px; }
.bt-share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bt-leave { margin-left: auto; }
.bt-link { color: var(--muted); font-size: .82rem; margin-top: 8px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.row input[aria-invalid=true] { border-color: #ff8a8a; box-shadow: 0 0 0 1px #ff8a8a inset; }
.btn:disabled { opacity: .6; cursor: default; }

/* How it works + FAQ */
.bt-how ol { margin: 0; padding-left: 1.3em; color: var(--muted); max-width: 65ch; }
.bt-how li + li { margin-top: 6px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 14px; }
.faq-item + .faq-item { margin-top: 8px; }
.faq-item summary { cursor: pointer; font-weight: 900; padding: 11px 0; min-height: 44px; list-style-position: outside; }
.faq-item p { color: var(--muted); font-size: .92rem; padding: 0 0 12px; max-width: 65ch; }

@media (hover: hover) {
  .bt-select:hover { border-color: rgba(233,230,242,.3); }
  .bt-inbed:not(:disabled):hover { filter: brightness(1.08); }
}
@media (max-width: 360px) {
  .bt-streak { gap: 20px; }
  .bt-cal { gap: 4px; }
}
