/* Local palette: one-off colors 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;
  --dp-ink-circle: #27306e; /* an Inklet's ink (src/art/pet.js INKB) */
}
/* 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(--ink); outline-offset: 1px; box-shadow: 0 0 0 7px var(--sky); position: relative; z-index: 1; } /* the halo over its neighbors */
.ws-grid .ws-start { background: var(--sun); border-color: var(--ink); }
.ws-grid .ws-found { background: var(--ok-bg); border-color: var(--gain); }
/* an Inklet's ink circle round one word's first letter (routes/wordsearch.js) */
.ws-grid .ws-ink { position: relative; }
.ws-grid .ws-ink::after { content: ''; position: absolute; inset: 1px; border: 2.5px solid var(--dp-ink-circle); border-radius: 50% 46% 52% 48%; rotate: -8deg; pointer-events: none; }
.ws-ink-note { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 700; }
.ws-ink-note svg { flex: none; }
.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: var(--card); 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: var(--card); 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: 2px; translate: -50% 0; width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
  background: none; border: 0; border-radius: 50%; cursor: pointer; opacity: .85; isolation: isolate; }
/* the twinkle: a white halo behind the gem and a brightening layer over it, both fading by opacity (a filter repainted every frame) */
.gem::before, .gem::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; opacity: 0; animation: gem-twinkle 2.4s ease-in-out infinite; }
.gem::before { z-index: -1; inset: 0; background: radial-gradient(closest-side, #fff 0 55%, transparent); }
.gem::after { inset: 5px; background: rgb(255 255 255 / .15); mix-blend-mode: screen; }
.gem:hover, .gem:focus-visible { opacity: 1; scale: 1.15; }
.gem:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 8px var(--sky); }
@keyframes gem-twinkle { 50% { opacity: 1; } }

/* 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; }
}

/* The reward receipt under a daily's result (logic/receipt.js, 2026-10-15 pick B). One centered line when a play paid one
   amount or none; a cream slip with a Glimmers total when it paid two or more, and on every Star Sifter result. */
.rc-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 12px 0 0; padding-top: 10px; border-top: 2px dashed var(--rule); text-align: center; font-size: var(--fs-sm); line-height: 1.6; }
.rc-line span { white-space: nowrap; }
.rc-slip { max-width: 360px; margin: 14px auto 0; padding: 14px 16px 12px; background: var(--sun-cream); border: 2px solid var(--ink); border-radius: var(--r-sm); text-align: left; color: var(--ink); }
.rc-slip h3 { margin: 0 0 6px; font: 700 var(--fs-sm) var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: center; }
.rc-slip dl { display: grid; grid-template-columns: fit-content(60%) 1fr; gap: 4px 12px; margin: 0; }
.rc-slip dt { font-size: var(--fs-sm); }
.rc-slip dd { margin: 0; font: 700 var(--fs-sm) var(--display); text-align: right; }
.rc-slip .rc-total { padding-top: 6px; border-top: 2px dashed var(--rule); font-weight: 800; }
.rc-slip dd.rc-total { color: var(--gain); }
