/* Daily Jam (its screen in app.html). Today's list is laid out like solo mode's rules screen and the word like a solo word, so
   solo.css and the room page's styles do most of it. This is today's list of words, the tries and the ✓, and the box
   after a word. */

/* Every rule here starts with :where([data-styles~="daily"]): the game's screens are all on one page (app.html), with
   every screen's stylesheet loaded, and that keeps this one's rules to the screens that name it in their data-styles.
   (:where adds no weight, so the rules count for just what they did before it. A rule for the screen itself has no
   space after it.) */

/* A sunrise for a new day's words */
:where([data-styles~="daily"]).daily { --glow-a: rgba(255, 170, 90, 0.34); --glow-b: rgba(255, 95, 168, 0.28); --glow-c: rgba(124, 108, 240, 0.30); --toast-top: 64px; }


/* Today's list */

/* If it can't be got (while it loads, the list itself shows that, with grey bars in it - see daily.js) */
:where([data-styles~="daily"]) .daily-status {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 6px 0;
  text-align: center;
}

:where([data-styles~="daily"]) .daily-status p {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-muted);
}

:where([data-styles~="daily"]) .daily-levels {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

/* One word: its level and length on the left, how you're doing on it on the right */
:where([data-styles~="daily"]) .daily-level {
  appearance: none;
  width: 100%;
  min-height: 60px;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  border: 2px solid var(--field-line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  /* A layer of its own for the new word's peach (::before, below) */
  position: relative;
  isolation: isolate;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

/* A new word's peach. It's a gradient, which can't ease from one color to another as the other rows' colors do, so it's
   a layer that fades in and out instead - nothing snaps as the list comes in. (Not in the grid: ::after is the
   spinner's.) */
:where([data-styles~="daily"]) .daily-level::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: var(--pink-soft);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

/* Past midnight, yesterday's rows while today's come (daily.js) */
:where([data-styles~="daily"]) .daily-levels.stale .daily-level { opacity: 0.45; }

/* (A mouse's hover only: on a phone it would stay on the last row tapped) */
@media (hover: hover) {
  :where([data-styles~="daily"]) .daily-level:hover { transform: translateY(-1px); }
}
:where([data-styles~="daily"]) .daily-level:is(:active, .is-pressed):not(:disabled) { scale: 0.98; }
:where([data-styles~="daily"]) .daily-level:disabled { cursor: default; transform: none; }
/* While one of today's words opens, the other two are off, and after a beat (a quick open doesn't flash them) they
   look it */
:where([data-styles~="daily"]) .daily-levels:has(.daily-level.opening) .daily-level:disabled:not(.opening) {
  opacity: 0.6;
  transition-delay: 0.15s;
}

:where([data-styles~="daily"]) .level-name {
  font-weight: 800;
  font-size: 17px;
}

:where([data-styles~="daily"]) .level-length {
  grid-row: 2;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-muted);
}

/* On a narrow screen "Continue · 2 tries left" goes onto two lines, rather than past the card's edge */
:where([data-styles~="daily"]) .level-state {
  grid-column: 2;
  grid-row: 1 / 3;
  justify-self: end;
  font-weight: 800;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

:where([data-styles~="daily"]) .daily-level.new { border-color: transparent; }
:where([data-styles~="daily"]) .daily-level.new::before { opacity: 1; }
:where([data-styles~="daily"]) .daily-level.new .level-state { color: var(--jam-deep); }
:where([data-styles~="daily"]) .daily-level.going .level-state { color: var(--warn-ink); }
:where([data-styles~="daily"]) .daily-level.got { background: var(--good-soft); border-color: var(--good-line); }
:where([data-styles~="daily"]) .daily-level.got .level-state { color: var(--good-ink); }
:where([data-styles~="daily"]) .daily-level.missed { background: var(--field); }
:where([data-styles~="daily"]) .daily-level.missed .level-state { color: var(--ink-muted); letter-spacing: 0.04em; }

/* Waiting on the server to open it: what it says fades, and if the wait goes on, a spinner fades in in its place - as
   the skeletons wait their moment (/shared/skeleton.css), so a quick reply never flashes one up */
:where([data-styles~="daily"]) .level-state { transition: opacity 0.15s ease; }
:where([data-styles~="daily"]) .daily-level.opening .level-state { opacity: 0; }
:where([data-styles~="daily"]) .daily-level.opening::after {
  content: "";
  grid-column: 2;
  grid-row: 1 / 3;
  justify-self: end;
  width: 18px;
  height: 18px;
  border: 3px solid var(--jam);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite, skelIn 0.2s ease 0.15s both;
}

/* Today's leaderboard: a row under the words, made like theirs but quieter - it's somewhere to look, not a word to
   play. How many have played today is on its right, once that's known. */
:where([data-styles~="daily"]) .daily-row {
  appearance: none;
  width: 100%;
  min-height: 52px;
  padding: 8px 14px 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--field-line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, scale 0.15s ease;
}
@media (hover: hover) {
  :where([data-styles~="daily"]) .daily-row:hover { transform: translateY(-1px); }
}
:where([data-styles~="daily"]) .daily-row:is(:active, .is-pressed) { scale: 0.98; }
:where([data-styles~="daily"]) .daily-row-name {
  flex: 1;
  min-width: 0;
  font-weight: 800;
  font-size: 16px;
}
:where([data-styles~="daily"]) .daily-row-state {
  flex: none;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
:where([data-styles~="daily"]) .daily-row-go { flex: none; width: 12px; height: 12px; color: var(--ink-muted); }

/* The rules, folded into a line once they've been read (daily.js): it opens them in a card */
:where([data-styles~="daily"]) .daily-rules-link {
  appearance: none;
  justify-self: center;
  margin: -4px 0 -6px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--field-line);
  text-underline-offset: 3px;
  cursor: pointer;
}
:where([data-styles~="daily"]) .daily-rules-link:is(:active, .is-pressed) { background: var(--field); color: var(--ink); }
@media (hover: hover) {
  :where([data-styles~="daily"]) .daily-rules-link:hover { color: var(--ink); }
}
:where([data-styles~="daily"]) .daily-rules-dialog .solo-rules { margin: 0; }

/* Your streak, and when the next words come, in a line under the card: the streak first, a dot between them. With no
   streak there's just the countdown, in the middle. Its two forms ("🔥 3-day streak", "Best streak: 5") are the one
   height: the 🔥 made its line taller. */
:where([data-styles~="daily"]) .daily-foot {
  margin: -6px 0 0;
  min-height: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 10px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--on-dark-muted);
}
:where([data-styles~="daily"]) .daily-streak:not([hidden]) + .daily-next::before {
  content: "·";
  margin-right: 10px;
  color: var(--on-dark-muted);
}

:where([data-styles~="daily"]) .daily-foot b { color: #fff; font-variant-numeric: tabular-nums; }

:where([data-styles~="daily"]) .daily-streak {
  display: inline-flex;
  align-items: center;
  height: 24px;
  color: #fde68a;
  font-weight: 800;
  line-height: 1;
}


/* A word */

:where([data-styles~="daily"]) .daily-clock {
  margin-left: auto;
  min-width: 64px;
  text-align: center;
}

/* One for each try, red once it's used */
:where([data-styles~="daily"]) .daily-tries {
  margin: -6px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 8px;
}

:where([data-styles~="daily"]) .daily-tries li {
  width: 28px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: background 0.25s ease;
}

:where([data-styles~="daily"]) .daily-tries li.used { background: var(--bad); }

/* On its way to the server to be checked: a pulse, if the answer's slow to come (a quick one, the usual, never shows it
   - and so never cuts it off halfway) */
:where([data-styles~="daily"]) .answer-slots.checking .slot { animation: checking 0.8s ease-in-out 0.2s infinite; }

@keyframes checking {
  50% { opacity: 0.55; }
}

/* ...and once that's been a second, "Checking…", held until the answer comes (play.js) - the line otherwise floats up
   and fades (feedback in create-room/css/game-state.css) */
:where([data-styles~="daily"]) .feedback { transition: opacity 0.2s ease; flex-shrink: 0; }
:where([data-styles~="daily"]) .feedback.held { opacity: 1; }

/* A try made already: no try's used, so no red - a little shake, as ✓ with letters missing gets */
:where([data-styles~="daily"]) .answer-slots.nope { animation: shake 0.3s ease; }

/* Out of tries: the word turns over into the answer row letter by letter, as a word got does (flipIn in
   game-state.css) - each letter coming as its tile turns */
:where([data-styles~="daily"]) .answer-slots.reveal .slot { animation: flipIn 0.45s ease both, dailyLetterIn 0.45s ease both; }
:where([data-styles~="daily"]) .answer-slots.reveal .slot:nth-child(2) { animation-delay: 0.06s; }
:where([data-styles~="daily"]) .answer-slots.reveal .slot:nth-child(3) { animation-delay: 0.12s; }
:where([data-styles~="daily"]) .answer-slots.reveal .slot:nth-child(4) { animation-delay: 0.18s; }
:where([data-styles~="daily"]) .answer-slots.reveal .slot:nth-child(5) { animation-delay: 0.24s; }
:where([data-styles~="daily"]) .answer-slots.reveal .slot:nth-child(6) { animation-delay: 0.3s; }
:where([data-styles~="daily"]) .answer-slots.reveal .slot:nth-child(7) { animation-delay: 0.36s; }
:where([data-styles~="daily"]) .answer-slots.reveal .slot:nth-child(8) { animation-delay: 0.42s; }
:where([data-styles~="daily"]) .answer-slots.reveal .slot:nth-child(9) { animation-delay: 0.48s; }

@keyframes dailyLetterIn {
  0%, 50% { color: transparent; }
}

/* ✓, where solo mode's hint is: lit once every letter is in */
:where([data-styles~="daily"]) .check .powerup-icon {
  font-weight: 900;
  font-size: 26px;
  color: #fff;
}

:where([data-styles~="daily"]) .check.ready {
  background: rgba(16, 185, 129, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 20px rgba(52, 211, 153, 0.45);
}

:where([data-styles~="daily"]) .check.ready .powerup-icon { opacity: 1; filter: none; }

:where([data-styles~="daily"]) .check.nope { animation: shake 0.35s ease; }

/* The wrong tries so far, under the buttons. Their row is there from the start, one pill high, so the first one doesn't
   move the word up under the player's fingers; a long word's last one, which can go onto a second line, hangs below
   it rather than lift the word (it's the end of the word by then anyway). */
:where([data-styles~="daily"]) .daily-missed {
  height: 24px;
  /* Kept when the column is too tall for the screen, too (zoomed in, with a long word): an empty row would shrink to
     nothing there, and the first miss push the word down after all. The feedback line above is kept the same way. */
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: center;
  gap: 6px;
}

:where([data-styles~="daily"]) .daily-missed li {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  font-weight: 700;
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.12em;
  text-decoration: line-through;
  text-decoration-color: rgba(254, 202, 202, 0.6);
}
html.colorblind :where([data-styles~="daily"]) .daily-missed li { background: rgba(249, 115, 22, 0.2); color: var(--bad-pale); text-decoration-color: rgba(254, 215, 170, 0.6); }

/* The one just made pops in once the row's shake is over */
:where([data-styles~="daily"]) .daily-missed li.new { animation: popIn 0.25s ease-out 0.35s both; }

:where([data-styles~="daily"]) .daily-missed li::before { content: "✗ "; text-decoration: none; display: inline-block; margin-right: 2px; }

/* A phone on its side: the word, its buttons and the rows kept for a miss all on the screen - a phone's tiles rather
   than a wide screen's, closer together, and none of the room solo keeps at the bottom for its dots (Daily Jam has
   none). A very short one (an SE on its side) has smaller tiles still. */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 480px) {
  :where([data-styles~="daily"]) .game-content { --tile-size: 52px; --tile-gap: 8px; gap: 10px; padding-top: 4px; padding-bottom: 8px; }
}
@media (orientation: landscape) and (max-height: 340px) and (min-width: 480px) {
  :where([data-styles~="daily"]) .game-content { --tile-size: 44px; --tile-gap: 6px; gap: 6px; }
}


/* The box after a word (result.js): a card up from the bottom (/shared/sheet.css), its head made like the solo
   leaderboard's (board-* in /shared/theme.css) */

:where([data-styles~="daily"]) .result-card { text-align: center; }
:where([data-styles~="daily"]) .result-card > .sheet-body { gap: 14px; }

/* The box itself has the focus when it opens - its buttons show it when tabbed to, not the whole box */
:where([data-styles~="daily"]) .result-dialog:focus-visible { outline: none; }

:where([data-styles~="daily"]) .result-eyebrow {
  margin: 0;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

:where([data-styles~="daily"]) .result-title {
  margin: -6px 0 0;
  font-weight: 900;
  font-size: 26px;
  line-height: 1.15;
}

/* The word, as tiles that fit the box at any length (the card is the screen's width on a phone, 480px at most) */
:where([data-styles~="daily"]) .result-word {
  --tile-size: min(36px, calc((min(100vw, 480px) - 40px - (var(--letters) - 1) * 4px) / var(--letters)));
  display: flex;
  justify-content: center;
  gap: 4px;
}

:where([data-styles~="daily"]) .result-word .tile { box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); }
:where([data-styles~="daily"]) .result-word.got .tile { background: var(--go); color: #fff; }
:where([data-styles~="daily"]) .result-word.missed .tile { background: var(--field); color: var(--ink); }

:where([data-styles~="daily"]) .result-note {
  margin: -4px 0 0;
  font-size: 14px;
  color: var(--ink-muted);
}

/* Couldn't get today's numbers (while they load, grey bars stand in for them - see result.js) */
:where([data-styles~="daily"]) .result-status {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 12px 0;
}

:where([data-styles~="daily"]) .result-status p {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-muted);
}

:where([data-styles~="daily"]) .result-numbers {
  display: grid;
  gap: 14px;
}

:where([data-styles~="daily"]) .result-standing {
  margin: 0;
  justify-self: center;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--field);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.3;
  text-wrap: balance;
  /* Every digit one width, so its grey stand-in's "00%" (skelWords in result.js) is as wide as the number that comes */
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease, color 0.2s ease;
}

:where([data-styles~="daily"]) .result-standing.great { background: var(--good-bg); color: var(--good-ink); }

/* A sentence on its way (result.js skelWords): its words, unseen, on the skeletons' grey - so it wraps onto just the
   lines the real one will, and the box doesn't change size when that comes. Fades in after a moment, as they do. */
:where([data-styles~="daily"]) .skel-words {
  border-radius: 6px;
  background: var(--skel-base);
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  user-select: none;
  animation: skelIn var(--dur-base, 0.22s) ease 0.15s both;
}

/* Your time, today's average and your streak, side by side */
:where([data-styles~="daily"]) .result-tiles {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

:where([data-styles~="daily"]) .result-tiles div {
  padding: 10px 6px;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  border-radius: 12px;
  background: var(--field);
}

:where([data-styles~="daily"]) .result-tiles dt {
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-muted);
}

/* (A line-height of its own: left to the font, the streak's 🔥 made its line taller than the grey bar before it, and the
   box grew as the numbers came) */
:where([data-styles~="daily"]) .result-tiles dd {
  margin: 0;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

:where([data-styles~="daily"]) .result-tiles dd small {
  display: block;
  margin-top: 2px;
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-muted);
}

:where([data-styles~="daily"]) .result-compare {
  margin: -4px 0 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-muted);
}

/* How today's players did: a bar each for 1, 2 and 3 tries and missed, all one neutral color but yours */
:where([data-styles~="daily"]) .result-breakdown { text-align: left; }

:where([data-styles~="daily"]) .result-breakdown h3 {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 14px;
}

:where([data-styles~="daily"]) .bars {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

:where([data-styles~="daily"]) .bars li {
  display: grid;
  grid-template-columns: 58px 1fr 34px;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

:where([data-styles~="daily"]) .bar-label {
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

:where([data-styles~="daily"]) .bar-track {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

/* Square where it starts, rounded at the end that shows the count */
:where([data-styles~="daily"]) .bar {
  height: 20px;
  flex: none;
  max-width: calc(100% - 32px);
  border-radius: 0 4px 4px 0;
  background: var(--chart);
}

:where([data-styles~="daily"]) .bar-count {
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

:where([data-styles~="daily"]) .bars li.you .bar { background: var(--you); }
:where([data-styles~="daily"]) .bars li.you .bar-label { color: var(--ink); font-weight: 800; }

/* A bar while today's numbers are on their way (result.js): grey, the height and corners of a real one */
:where([data-styles~="daily"]) .bar-track .skel { --h: 20px; --r: 0 4px 4px 0; }

:where([data-styles~="daily"]) .bar-you {
  font-weight: 800;
  font-size: 12px;
  color: var(--you);
}

/* The buttons under a result (result.js): the big one - the next word, or Share after the last - and under it the
   others, however many there are just now, as wide as each other with their pictures over their words */
:where([data-styles~="daily"]) .result-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
:where([data-styles~="daily"]) .result-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
:where([data-styles~="daily"]) .result-main i { font-style: normal; }
:where([data-styles~="daily"]) .result-more {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
}
:where([data-styles~="daily"]) .result-more:not(:has(> .btn:not([hidden]))) { display: none; }
:where([data-styles~="daily"]) .result-more > .btn {
  min-width: 0;
  height: auto;
  min-height: 58px;
  padding: 8px 4px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  font-size: 13px;
  line-height: 1.15;
}
:where([data-styles~="daily"]) .result-more > .btn[hidden] { display: none; }
:where([data-styles~="daily"]) .result-more > .btn i { font-style: normal; font-size: 20px; line-height: 1; }
/* With only one of them left, it's a line rather than a tall tile */
:where([data-styles~="daily"]) .result-more > .btn:only-child, :where([data-styles~="daily"]) .result-more:not(:has(> .btn:not([hidden]) ~ .btn:not([hidden]))) > .btn {
  min-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 15px;
}
:where([data-styles~="daily"]) .result-more:not(:has(> .btn:not([hidden]) ~ .btn:not([hidden]))) > .btn i { font-size: inherit; }

:where([data-styles~="daily"]) .result-next {
  margin: -4px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

:where([data-styles~="daily"]) .result-next b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* A phone held sideways, where the card is wider and shorter (/shared/sheet.css): two columns - the word, how you did,
   your numbers and when the next words come on the left; today's players, and the buttons beside your numbers, on the
   right - so Share and Done are on the screen without scrolling. The numbers' box steps aside (display: contents) so
   its parts can go to either side; the gaps are margins, so a part that's hidden (the note, the couldn't-load line)
   leaves none. */
@media (orientation: landscape) and (max-height: 500px) {
  :where([data-styles~="daily"]) .result-card > .sheet-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "title breakdown"
      "word breakdown"
      "note breakdown"
      "status breakdown"
      "standing breakdown"
      "tiles actions"
      "compare actions"
      "next actions";
    align-items: start;
    gap: 0 24px;
  }
  :where([data-styles~="daily"]) .result-numbers { display: contents; }
  :where([data-styles~="daily"]) .result-title { grid-area: title; margin: 0; font-size: 24px; }
  /* The tiles fit their column: (the card, less its sides and the gap between the columns) / 2 */
  :where([data-styles~="daily"]) .result-word {
    grid-area: word;
    margin-top: 10px;
    --tile-size: min(32px, calc(((min(640px, 100vw) - 56px) / 2 - (var(--letters) - 1) * 4px) / var(--letters)));
  }
  :where([data-styles~="daily"]) .result-note { grid-area: note; margin: 6px 0 0; }
  :where([data-styles~="daily"]) .result-status { grid-area: status; margin-top: 6px; padding: 6px 0 0; }
  /* Small enough for "Better than 100% of today's players" to fit its column on one line, as its grey stand-in does -
     at 15px, one of two digits went onto a second line, so the card changed size as the number came */
  :where([data-styles~="daily"]) .result-standing { grid-area: standing; margin-top: 12px; padding: 7px 12px; font-size: 14px; }
  :where([data-styles~="daily"]) .result-tiles { grid-area: tiles; margin-top: 12px; }
  :where([data-styles~="daily"]) .result-compare { grid-area: compare; margin: 8px 0 0; }
  :where([data-styles~="daily"]) .result-breakdown { grid-area: breakdown; }
  :where([data-styles~="daily"]) .result-actions { grid-area: actions; margin-top: 12px; }
  :where([data-styles~="daily"]) .result-next { grid-area: next; margin: 8px 0 0; }
}

/* The corner button's 🏠 and arrow back, one over the other while one fades into the other (daily.js showCorner) */
:where([data-styles~="daily"]) .corner-glyph {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  line-height: 1;
}


/* Held sideways on a phone: the title smaller and closer to the top, so today's words are on the screen rather than
   below it */
@media (orientation: landscape) and (max-height: 500px) {
  :where([data-styles~="daily"]) .daily-intro {
    gap: 14px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
  }
  :where([data-styles~="daily"]) .daily-intro .solo-head { gap: 6px; }
  :where([data-styles~="daily"]) .daily-intro .code-tiles { --tile-size: 34px; gap: 5px; }
  :where([data-styles~="daily"]) .daily-intro .solo-tagline { font-size: 15px; }
  :where([data-styles~="daily"]) .daily-level { min-height: 52px; padding-block: 6px; }
  :where([data-styles~="daily"]) .daily-row { min-height: 44px; }
}


/* With Reduce Motion: a row's spinner still turns (slower), as theme.css keeps .spinner turning - a frozen one says
   nothing - and a try being checked dims, still, rather than pulsing (after the same moment) */
/* Less motion: the phone's Reduce Motion, or the switch in Settings (html.reduce-motion - /shared/settings.js) */
html.reduce-motion :where([data-styles~="daily"]) .daily-level.opening::after {
  animation-duration: 1.6s, 0.01ms !important;
  animation-iteration-count: infinite, 1 !important;
}
html.reduce-motion :where([data-styles~="daily"]) .answer-slots.checking .slot {
  animation: dailyCheckingStill 1s linear 0.2s infinite !important;
}

@keyframes dailyCheckingStill {
  from, to { opacity: 0.6; }
}


/* ---------- Friends and challenges (daily.js, result.js; /shared/friends.js) ---------- */

/* Opened from a challenge's link: whose go there is to beat, over today's list - and how yours stands against it */
:where([data-styles~="daily"]) .daily-challenge {
  width: 100%;
  max-width: 440px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  background: rgba(20, 18, 28, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  text-wrap: balance;
}
/* Its word, picked out in the list */
:where([data-styles~="daily"]) .daily-level.challenged { box-shadow: 0 0 0 3px var(--jam); }

/* In a finished word's card: your go against the challenge's */
:where([data-styles~="daily"]) .result-versus {
  margin: 0;
  justify-self: center;
  padding: 9px 16px;
  border-radius: 14px;
  background: var(--pink-bg);
  color: var(--pink-ink);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.35;
  text-wrap: balance;
}
/* ...how your friends did on it (the rows are /shared/friends.css's, a size smaller)... */
:where([data-styles~="daily"]) .result-friends { text-align: left; display: grid; gap: 8px; }
:where([data-styles~="daily"]) .result-friends h3 { margin: 0; font-weight: 700; font-size: 14px; }
:where([data-styles~="daily"]) .result-friends .friends-rows { margin: 0; }
:where([data-styles~="daily"]) .friend-row.is-slim { min-height: 44px; padding: 6px 12px 6px 8px; gap: 10px; --face: 28px; }
:where([data-styles~="daily"]) .friend-row.is-slim.you { background: var(--you-bg); color: var(--you); }
:where([data-styles~="daily"]) .friend-go { flex: none; font-weight: 700; font-size: 13px; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
:where([data-styles~="daily"]) .friend-row.you .friend-go { color: var(--you); }


/* Inside WeRewards (/shared/embed.js): its sheet has the way out, so today's list has no 🏠 - a word keeps its ← back
   to the list */
:where(.embed) [data-styles~="daily"].daily > .home-btn { display: none; }
