/* The daily game (/daily only). Colours come from the variables in site.css, which themes.css redefines per theme:
   --felt-text and --felt-text-2 on the green table, the surface and text names inside the cards. */

/* Date, layout and countdown under the intro, filled before the first paint: one line on wide
   screens, the countdown on its own line on phones. */
.game-intro .daily-meta { min-height: 1.6em; margin-top: 4px; color: var(--felt-text); font-weight: 600; }
.game-intro .daily-next { color: var(--felt-text-2); font-weight: 400; font-variant-numeric: tabular-nums; }
.game-intro .daily-next::before { content: "\00b7"; margin: 0 .4em; color: var(--felt-text); font-weight: 600; }
/* Links on the table look like the breadcrumb links: the table's text colour, underlined. */
.game-intro .daily-meta a, .game-intro .daily-next a { color: var(--felt-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.game-intro .daily-meta a:hover, .game-intro .daily-next a:hover { color: var(--felt-text); text-decoration-thickness: 2px; }

/* Six buttons instead of seven: no New button and no layout menu on this page. */
@media (max-width: 760px) {
  [data-daily] .game-actions { grid-template-columns: repeat(6, 1fr); }
  .game-intro .daily-next { display: block; min-height: 1.6em; }
  .game-intro .daily-next::before { content: none; }
}

/* Result card */
.daily-result p { margin-bottom: 10px; }
.daily-result .daily-result-streak { color: var(--heading); font-weight: 700; }
.daily-result [data-daily-result="note"]:empty { display: none; }
.daily-result .dialog-actions { margin-top: 6px; }
.daily-feedback { min-height: 1.5em; margin: 8px 0 0; font-size: .9rem; color: var(--text-muted); }
.daily-result .daily-feedback { margin: 10px 0 0; }

/* Stats panel */
.daily-today { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 40px; margin: 0; font-weight: 600; }
.daily-today .btn { color: var(--soft-btn-text); border-color: var(--line); background: var(--page-bg); min-height: 36px; }
.daily-today .btn:hover { border-color: var(--link); background: var(--page-bg); }
.daily-numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 6px 0 18px; }
.daily-numbers div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--page-bg); }
.daily-numbers dt { font-size: .85rem; color: var(--text-muted); }
.daily-numbers dd { margin: 2px 0 0; font-size: 1.35rem; font-weight: 700; line-height: 1.3; color: var(--heading); font-variant-numeric: tabular-nums; }
.daily-stats h3 { margin: 0 0 8px; font-size: 1.1rem; }

/* The last 30 days, Monday first: room for six weeks, so the panel never changes height. */
.daily-month { max-width: 380px; }
.daily-weekdays, .daily-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.daily-weekdays { margin-bottom: 4px; font-size: .75rem; text-align: center; color: var(--text-muted); }
.daily-calendar { grid-auto-rows: 40px; min-height: calc(6 * 40px + 5 * 4px); }
.daily-day {
  display: flex; align-items: center; justify-content: center; height: 100%; border-radius: 8px;
  border: 1px solid var(--line); background: var(--page-bg); color: var(--text); text-decoration: none;
  font-size: .9rem; font-variant-numeric: tabular-nums;
}
.daily-day:hover { border-color: var(--link); color: var(--text); }
.daily-day.is-won { background: var(--jade-600); border-color: var(--jade-600); color: #fff; font-weight: 700; }
.daily-day.is-won:hover { color: #fff; }
.daily-day.is-started { background: var(--gold-soft); border-color: var(--gold); color: #2b2205; }
/* The day on show: a dark ring in every theme (gold was too faint on the white cards). */
.daily-day[aria-current="page"] { outline: 3px solid var(--heading); outline-offset: 1px; }
.daily-legend { margin: 10px 0 0; font-size: .88rem; color: var(--text-muted); }
.daily-key { display: inline-block; width: .9em; height: .9em; margin: 0 2px 0 8px; border-radius: 3px; border: 1px solid var(--line); vertical-align: -.1em; background: var(--page-bg); }
.daily-key:first-child { margin-left: 0; }
.daily-key.is-won { background: var(--jade-600); border-color: var(--jade-600); }
.daily-key.is-started { background: var(--gold-soft); border-color: var(--gold); }
.daily-privacy { margin: 12px 0 0; font-size: .88rem; color: var(--text-muted); }
.daily-week td:last-child { white-space: nowrap; }

@media (max-width: 560px) {
  .daily-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-numbers dd { font-size: 1.15rem; }
  .daily-calendar { grid-auto-rows: 38px; min-height: calc(6 * 38px + 5 * 4px); }
}
