/* The week on an end screen (SG-141, PROGRESS-PLAN.html; js/week-tile.js). One tile under the score: seven day marks, the count
   against her goal and the streak. Two registers. On a light page (the end of a flashcard pass) it is a panel tile with Home's
   strip colours. On the Play field (inside .play) fills are white, as the score's own dots are, and the tile is the field's solid
   Play tile (DD-020, mockups/sg16-week.html, End of a Round, option 3). Today is outlined, a day skipped looks like a day to come. */
.e-week { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; width:100%; max-width:380px; min-height:44px; margin:12px 0 16px; padding:12px 14px; border-radius:var(--r-card, 16px); background:var(--panel); }
.e-week[hidden] { display:none; }
.e-days { display:flex; gap:5px; }
.e-pip { width:24px; height:24px; border-radius:50%; display:grid; place-items:center; background:var(--bg); color:var(--ink-2); font:700 11.5px var(--font-head); }
.e-pip.done { background:var(--leaf); color:var(--on-leaf); }
.e-pip.today { box-shadow:0 0 0 2px var(--panel), 0 0 0 4px var(--leaf-text); }
.e-say { display:flex; flex-direction:column; align-items:flex-end; gap:1px; min-width:0; text-align:right; }
.e-b { font-family:var(--font-head); font-weight:700; font-size:15px; line-height:1.25; letter-spacing:-.01em; white-space:nowrap; font-variant-numeric:tabular-nums; color:var(--ink); }
.e-m { display:flex; align-items:center; gap:4px; font-size:13px; line-height:1.3; color:var(--ink-2); white-space:nowrap; }
.e-m .ic { color:var(--leaf-text); }
.e-won { flex:none; display:inline-grid; place-items:center; width:18px; height:18px; border-radius:50%; background:var(--marigold); color:var(--on-marigold); vertical-align:-3px; margin-left:6px; }

/* A round that beat one of her bests (SG-145): one line across the top of the tile, a marigold trophy as the goal check is marigold. */
.e-best { flex:0 0 100%; display:flex; align-items:center; gap:8px; padding-bottom:10px; margin-bottom:-2px; border-bottom:1px solid var(--line); font-size:14px; line-height:1.3; color:var(--ink-2); }
.e-best b { font-family:var(--font-head); font-weight:700; letter-spacing:-.01em; font-variant-numeric:tabular-nums; color:var(--ink); }
.e-trophy { flex:none; display:inline-grid; place-items:center; width:22px; height:22px; border-radius:50%; background:var(--marigold); color:var(--on-marigold); }

/* A milestone's moment (SG-147; js/week-tile.js): the tile Progress draws for an earned milestone, as a banner under the week tile. Dark green with a lifted
   edge in both registers, so it is the same tile she finds on Progress; "New Milestone" in marigold takes the place of the day. */
.e-moment { display:flex; flex-direction:column; gap:3px; width:100%; max-width:380px; margin:-4px 0 16px; padding:14px 16px; border-radius:var(--r-sm); border:1px solid color-mix(in srgb, var(--leaf) 60%, var(--tile-play)); background:var(--tile-play); color:#fff; }
.e-moment b { font-family:var(--font-head); font-weight:700; font-size:20px; line-height:1.15; letter-spacing:-.02em; }
.e-mk { font-size:12.5px; line-height:1.3; font-weight:600; color:var(--marigold); }
.e-ms { font-size:14px; line-height:1.35; color:rgba(255,255,255,.88); }
.play .e-moment { margin:10px auto 0; }

/* On the Play field the fills are white, as the score's own dots are. */
.play .e-week { margin:4px auto 0; box-shadow:inset 0 0 0 1px var(--tile-edge); }
.play .e-pip { background:var(--field); color:var(--ink-2); }
.play .e-pip.done { background:#fff; color:var(--p-green); }
.play .e-pip.today { box-shadow:0 0 0 2px var(--tile-play), 0 0 0 4px #fff; }
.play .e-m .ic { color:#fff; }
.play .e-best { border-bottom-color:var(--tile-edge); color:rgba(255,255,255,.88); }
.play .e-best b { color:#fff; }

/* Under 360px the tile stacks, the days above the words. */
@media (max-width:359px) { .e-week { flex-direction:column; gap:8px; } .e-say { flex-direction:row; align-items:center; gap:12px; } }

/* The round that brings in the last day: the check pops and the streak lifts in once. Off under Reduce Motion. */
@keyframes e-pop { from { transform:scale(.4); opacity:0; } to { transform:none; opacity:1; } }
@keyframes e-lift { from { transform:translateY(6px); opacity:0; } to { transform:none; opacity:1; } }
@media (prefers-reduced-motion: no-preference) {
  .e-just .e-won { animation:e-pop .55s var(--ease-spring) backwards .35s; }
  .e-just .e-pip.today { animation:e-pop .55s var(--ease-spring) backwards .15s; }
  .e-just .e-m { animation:e-lift .5s var(--ease-spring) backwards .6s; }
  .e-best { animation:e-lift .5s var(--ease-spring) backwards .2s; }
  .e-moment.in { animation:e-lift .6s var(--ease-spring) backwards; }
  .e-trophy { animation:e-pop .55s var(--ease-spring) backwards .4s; }
}
