/* Standalone daily page. Builds on site.css, play.css and sprites.css; only what is new lives here. */

.daily-header { padding-block: 0.75rem 0.5rem; }
.daily-header .wordmark { min-width: 0; }
.daily-header .wordmark span { min-width: 0; line-height: 1.05; white-space: normal; overflow: visible; text-overflow: clip; }
.header-actions { display: flex; gap: 6px; flex: none; }
.btn.icon-btn { width: 44px; min-width: 44px; padding: 0; font-size: var(--step-1); }
.btn.icon-btn svg { display: block; }
@media (max-width: 440px) {
  .daily-header .wordmark { font-size: var(--step-0); gap: 0.45rem; }
  .daily-header .wordmark img { width: 32px; height: 32px; }
}

.title-block { min-width: 0; }
.tag { display: inline-block; vertical-align: middle; margin-left: 2px; padding: 2px 8px; font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; line-height: 1.3; color: var(--chalk); background: var(--panel); border: 2px solid var(--outline); border-radius: 999px; }
.today-link { width: auto; margin-top: 6px; padding-inline: 1rem; }
.date-line { margin: 2px 0 0; color: var(--muted); font-weight: 700; font-size: var(--step--1); }

/* Five pips: a filled pip is a try left, an empty one is spent, a tick is the try that won. No legend colours. */
.tries { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tries-label { font-size: 0.8125rem; font-weight: 700; color: var(--muted); line-height: 1; }
.pips { display: inline-flex; gap: 5px; }
.pips i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--outline);
  background: var(--panel);
  transition: background-color 160ms ease;
}
.pips i.left { background: var(--outline); }
.pips i.won { position: relative; background: var(--panel); }
.pips i.won::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 5px;
  height: 9px;
  border: solid var(--outline);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(40deg);
}

/* The break message, with no way out unless the app link is on. */
.daily-note .btn { width: auto; }
.daily-note.new-day { border-color: var(--outline); }
#status:empty { min-height: 0; padding: 0; border: 0; }

.controls .btn { width: 100%; }
.result-actions .btn { width: 100%; }
.result .win-line { color: var(--chalk); font-weight: 700; }
.countdown { margin: 4px 0 0; color: var(--muted); font-size: var(--step--1); font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.countdown .btn { min-height: 44px; padding: 0.4rem 1.1rem; }
.share-note { margin: 0; font-weight: 700; color: var(--chalk); font-size: var(--step--1); }
.share-box {
  width: 100%;
  min-height: 7.5em;
  padding: 10px;
  font: inherit;
  font-size: var(--step--1);
  color: var(--chalk);
  background: var(--panel);
  border: 2px solid var(--outline);
  border-radius: 10px;
  resize: none;
}
.app-card { display: grid; gap: 8px; padding: 12px 14px; border: 2px dashed var(--outline); border-radius: 12px; background: var(--page); }
.app-card p { margin: 0; font-weight: 700; }

/* Notes on the board when the day is done. */
.hint.note { color: var(--chalk); border-left-color: var(--gold); background: color-mix(in srgb, var(--gold) 22%, transparent); }

/* ---------- dialogs ---------- */

.dlg {
  width: min(calc(100vw - 32px), 420px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  color: var(--chalk);
  background: var(--panel);
  border: 2px solid var(--outline);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--outline);
}
.dlg::backdrop { background: color-mix(in srgb, var(--outline) 55%, transparent); }
.dlg-body { display: grid; gap: 14px; padding: 18px; }
.dlg h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); line-height: 1.1; }
.dlg .btn { width: 100%; }

.howto-coach { display: flex; align-items: center; gap: 22px; margin-block: -4px -2px; }
.howto-toad { flex: none; width: 56%; aspect-ratio: 390 / 400; overflow: hidden; margin-left: -8px; }
.howto-toad .sprite { display: block; width: 100%; }
.howto-toad .sprite svg { display: block; width: 100%; height: auto; }
.howto-coach .bubble { position: relative; flex: 1; min-width: 0; font-size: 1rem; padding: 0.6rem 0.75rem; }
/* This tail points left, at the toad. */
.howto-coach .bubble::before { right: auto; left: -17px; top: 50%; border-width: 8px 17px 8px 0; border-left-color: transparent; border-right-color: var(--outline); }
.howto-coach .bubble::after { right: auto; left: -12px; top: calc(50% + 2.5px); border-width: 6px 13px 6px 0; border-left-color: transparent; border-right-color: #fffaf0; }

.howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.howto li { display: flex; align-items: center; gap: 12px; }
.howto p { margin: 0; line-height: 1.4; }
.howto-art {
  flex: none;
  position: relative;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--grass);
  border: 2px solid var(--outline);
  border-radius: 10px;
  overflow: hidden;
}
.howto-art .sprite { display: block; width: 100%; height: 100%; }
.howto-art .sprite svg { display: block; width: 100%; height: 100%; }
.howto-art .wall-art { width: 100%; height: 100%; }
.howto-score { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); color: var(--chalk); background: var(--page); }
.howto-house { background: center / 100% 100% no-repeat url(../sprites/tile-house.svg); }

.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.stats-grid div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; background: var(--page); border: 2px solid var(--outline); border-radius: 10px; text-align: center; }
.stats-grid dt { order: 2; font-size: 0.75rem; font-weight: 700; color: var(--muted); line-height: 1.1; }
.stats-grid dd { order: 1; margin: 0; font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); font-variant-numeric: tabular-nums; }
.dist-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: var(--step-0); }
.dist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dist li { display: grid; grid-template-columns: 5.5em 1fr; align-items: center; gap: 8px; font-weight: 700; font-size: var(--step--1); }
.dist .bar { display: block; min-width: 2em; padding: 2px 8px; border: 2px solid var(--outline); border-radius: 8px; background: var(--grid); color: var(--chalk); font-variant-numeric: tabular-nums; text-align: right; line-height: 1.4; }
.dist li.today .bar { background: var(--chalk); color: var(--panel); }
.dist li.today span:first-child::after { content: " (today)"; font-weight: 400; color: var(--muted); font-size: 0.75rem; }
.stats-empty { margin: 0; color: var(--muted); }

/* The archive: 30 rows of at least 44px. */
.archive-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.arch-row {
  display: grid;
  grid-template-columns: 3.2em 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 6px 12px;
  font: inherit;
  font-size: var(--step--1);
  font-weight: 700;
  text-align: left;
  color: var(--chalk);
  background: var(--page);
  border: 2px solid var(--outline);
  border-radius: 10px;
  cursor: pointer;
}
.arch-row:hover { background: var(--grid); }
.arch-row[aria-current="date"] { background: var(--grid); }
.arch-num { font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; }
.arch-today { margin-left: 4px; padding: 1px 7px; font-size: 0.75rem; color: var(--panel); background: var(--chalk); border-radius: 999px; }
.arch-result { display: inline-flex; align-items: center; gap: 0.35em; color: var(--muted); font-weight: 700; font-size: 0.8125rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.arch-part.won, .arch-part.lost, .arch-part.progress { color: var(--chalk); }

/* ---------- v2: Easy | Hard tabs, the score, the try list ---------- */

.size-tabs, .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 3px; background: var(--page); border: 2px solid var(--outline); border-radius: 12px; }
.size-tabs { max-width: 360px; margin-bottom: 4px; }
.size-tabs[hidden] { display: none; }
.size-tabs a, .seg button {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0 1rem;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-0);
  color: var(--chalk);
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}
.size-tabs a:hover, .seg button:hover { background: var(--grid); }
.size-tabs a[aria-current="page"], .seg button[aria-pressed="true"] { color: var(--panel); background: var(--chalk); }

.score-big { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 2.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.try-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.try-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; background: var(--page); border: 2px solid var(--outline); border-radius: 10px; font-size: var(--step--1); font-weight: 700; }
.try-list li strong { font-variant-numeric: tabular-nums; }
.try-list li.top { background: var(--grid); }
.result-actions.choice { grid-template-columns: 1fr; }
.arch-date { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.arch-today { margin-left: 0; }

/* The optimal solution toggle, under the score on a finished day. */
.solution-btn { width: 100%; }
.solution-note { margin: 0; font-weight: 700; color: var(--chalk); font-size: var(--step--1); }
.solution-note:empty { display: none; }

/* Everyone's scores, in the result panel of a finished day. */
.everyone { display: grid; gap: 8px; }
.everyone-note, .everyone-count { margin: 0; color: var(--muted); font-size: var(--step--1); font-weight: 700; }
.everyone-beat { margin: 0; line-height: 1.3; font-family: var(--font-display); font-weight: 800; font-size: var(--step-0); color: var(--chalk); }
.dist li.mine .bar { background: var(--chalk); color: var(--panel); }
.dist li.mine span:first-child::after { content: " (you)"; font-weight: 400; color: var(--muted); font-size: 0.75rem; }
