/* Local palette: one-off colours for this page, named by role. Global tokens live in style.css. */
:root {
  --dp-bingo-bg: #1c1450;
  --dp-bingo-cell-ink: #e8e4ff;
  --dp-bingo-cell-ink-2: #b9b2e8;
  --dp-bingo-star-fill: #3b3276;
  --dp-bingo-star-stroke: #8f86d8;
}
/* Newer dailies: lore quiz, word search, fortune cookie, login streak, daily goals, hidden gem. */

/* Lore quiz */
.quiz-form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.quiz-form legend { font-weight: 800; margin-bottom: 8px; }
.quiz-review { padding-left: 1.3em; }
.quiz-review li + li { margin-top: 12px; }
.quiz-review p { margin: 2px 0; }
.quiz-right { color: var(--gain); font-weight: 700; }
.quiz-wrong { color: var(--loss); font-weight: 700; }

/* Word search */
.ws-wrap { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: flex-start; }
.ws-wrap > :last-child:not(.ws-grid) { flex: 1 1 200px; }
.ws-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; width: min(100%, 420px); touch-action: manipulation; }
.ws-grid > * { aspect-ratio: 1; display: grid; place-items: center; min-width: 0; padding: 0; font: 700 clamp(.95rem, 4vw, 1.2rem) var(--display);
  color: var(--ink); background: var(--tint); border: 2px solid var(--rule); border-radius: 8px; }
.ws-grid button { cursor: pointer; }
.ws-grid button:focus-visible { outline: 3px solid var(--sky); outline-offset: 1px; }
.ws-grid .ws-start { background: var(--sun); border-color: var(--ink); }
.ws-grid .ws-found { background: var(--ok-bg); border-color: var(--gain); }
.ws-words { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.ws-words li { padding: 3px 10px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-weight: 800; }
.ws-words .ws-done { text-decoration: line-through; background: var(--ok-bg); color: var(--muted); }
.ws-status { min-height: 3em; font-weight: 700; }

/* Daily goals (home card + /goals) */
.goal-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.goal-list li { display: flex; align-items: center; gap: 10px; }
.goal-tick { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; font-weight: 800; }
.goal-list .done .goal-tick { background: var(--lime); }
.goal-list .done a { text-decoration: line-through; color: var(--muted); }
/* Weekly bingo: a night sky of 16 stars; a lit row gets a constellation line through it */
.bingo { display: grid; gap: 8px; padding: 12px; background: var(--dp-bingo-bg); border: 3px solid var(--ink); border-radius: var(--r-tile); }
.bingo-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; position: relative; }
.bingo-row.lit::before { content: ''; position: absolute; left: 6%; right: 6%; top: 26px; border-top: 3px dashed var(--sun-glow); }
.bingo-cell { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 8px 6px; text-align: center; text-decoration: none;
  color: var(--dp-bingo-cell-ink); font-size: var(--fs-xs); line-height: 1.25; border-radius: var(--r-sm); background: rgb(255 255 255 / .06); }
.bingo-cell:hover, .bingo-cell:focus-visible { background: rgb(255 255 255 / .14); }
.bingo-cell small { color: var(--dp-bingo-cell-ink-2); font-weight: 700; }
.bingo-star svg { fill: var(--dp-bingo-star-fill); stroke: var(--dp-bingo-star-stroke); stroke-width: 1.5; }
.bingo-cell.done .bingo-star svg { fill: var(--sun-glow); stroke: #fff; filter: drop-shadow(0 0 6px var(--sun-glow)); }
.bingo-cell.done small { color: var(--sun-glow); }
@media (max-width: 560px) { .bingo { padding: 8px; gap: 6px; } .bingo-row { gap: 4px; } .bingo-cell { padding: 6px 2px; font-size: .78rem; } }

/* Fortune cookie */
.fortune { margin: 0 0 12px; padding: 14px 18px; background: var(--hi-soft); border: 2px dashed var(--ink); border-radius: var(--r-sm); }
.fortune p { margin: 0; font: 600 1.15rem var(--display); }

/* Hidden gem: sits in its own strip under the page content, so it never covers anything */
.gem-slot { position: relative; height: 48px; margin: 0; }
.gem { position: absolute; top: 4px; translate: -50% 0; width: 40px; height: 40px; display: grid; place-items: center; padding: 0;
  background: none; border: 0; border-radius: 50%; cursor: pointer; opacity: .85; animation: gem-twinkle 2.4s ease-in-out infinite; }
.gem:hover, .gem:focus-visible { opacity: 1; scale: 1.15; }
.gem:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
@keyframes gem-twinkle { 50% { filter: drop-shadow(0 0 6px #fff) brightness(1.15); } }

/* Phone: the letter grid is the page, so it gets the card's full width (cells ~31px at 375, the most a 10x10 can have) */
@media (max-width: 560px) {
  .ws-card { padding: 10px; }
  .ws-grid { gap: 2px; width: 100%; }
  .ws-grid > * { border-width: 1px; border-radius: 6px; }
}
