/* the end of a game (28 Oct; endscreen.js): the coins counting up, the level bar, the level-up, the league line, then
   one full-width Deal again and the smaller next steps under it */
.end-prog { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; max-width: 520px; margin: 4px auto 2px;
  text-align: left; color: #fff; }
.end-coins { margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: calc(1.2rem * var(--ui, 1)); font-weight: 700; }
.end-coins .end-count { font-size: calc(1.5rem * var(--ui, 1)); color: #ffe58a; font-variant-numeric: tabular-nums; }
/* where the coins came from, one short line under the total (3 Nov) */
.end-coin-parts { margin: -2px 0 2px; text-align: center; font-size: 0.95rem; line-height: 1.35; color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums; text-wrap: balance; }
.end-coin { width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #f2c13d 45%, #b8862a); box-shadow: inset 0 0 0 2px rgba(120, 80, 10, 0.5); }
.end-level { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; row-gap: 2px; }
.end-lv { font-size: calc(1.05rem * var(--ui, 1)); white-space: nowrap; }
.end-bar { position: relative; height: 18px; border-radius: 999px; background: rgba(0, 0, 0, 0.4); overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.18); }
.end-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(180deg, #ffe58a, #e0a72a); }
.end-notch { position: absolute; top: 3px; bottom: 3px; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, 0.35); }
.end-gained { grid-column: 2; font-size: 0.9rem; color: rgba(255, 255, 255, 0.82); }
.end-gained:empty { display: none; }
.end-up { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px;
  background: rgba(240, 197, 78, 0.16); box-shadow: inset 0 0 0 2px rgba(240, 197, 78, 0.6); visibility: hidden; }
.end-up.shown { visibility: visible; }
.end-up.pop { animation: end-pop 420ms ease-out; }
@keyframes end-pop { from { transform: scale(0.85); opacity: 0.2; } to { transform: scale(1); opacity: 1; } }
.end-up-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.end-up-text strong { font-size: calc(1.15rem * var(--ui, 1)); color: #ffe58a; }
.end-up-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.end-pic { width: 48px; height: 48px; flex: 0 0 auto; display: inline-grid; place-items: center; border-radius: 10px; overflow: hidden; }
.end-pic img { width: 100%; height: 100%; object-fit: contain; }
.end-pic.swatch, .end-pic.back { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5); }
.end-pic.back { border-radius: 6px; width: 34px; margin: 0 7px; }
.end-pic.coin { border-radius: 50%; width: 36px; height: 36px; margin: 6px; background: radial-gradient(circle at 35% 30%, #fff3c4, #f2c13d 45%, #b8862a); }
.end-pic.cert { background: linear-gradient(#fffaf0, #f1e6c8); box-shadow: inset 0 0 0 3px #c98a12; }
.end-pic.bell, .end-pic.invite { background: rgba(255, 255, 255, 0.14); }
.end-pic.bell::after { content: "\266B"; font-size: 26px; color: #ffe58a; }
.end-pic.invite::after { content: "\2191"; font-size: 28px; font-weight: 800; color: #ffe58a; }
.end-next { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 0.95rem; line-height: 1.35; }
.end-next .end-pic { width: 32px; height: 32px; }
.end-next .end-pic.back { width: 22px; margin: 0 5px; }
.end-next .end-pic.coin { width: 24px; height: 24px; margin: 4px; }
.end-league { display: block; color: #ffe3a8; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; line-height: 1.35; padding: 4px 0; }
.end-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.end-name label { flex: 0 0 100%; font-size: 0.95rem; }
.end-name input { flex: 1 1 10rem; min-width: 0; min-height: 44px; font: inherit; padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.5); }
.end-note, .end-small-words { font-size: 0.9rem; color: #ffe3a8; margin: 0; }
.ask-go .end-small, .end-small, .mat .ask-go .end-small { min-width: 0; min-height: 44px; padding: 6px 14px; font-size: 0.95rem; font-weight: 700; border-radius: 10px;
  background: #f0c54e; color: #2b2110; border: 0; box-shadow: none; }
.ask-go .end-small.quiet, .end-small.quiet, .mat .ask-go .end-small.quiet { background: rgba(255, 255, 255, 0.16); color: #fff; }
.ask-go button.deal-again, .mat .ask-go button.deal-again { flex: 1 1 100%; width: 100%; min-height: 56px; font-size: calc(1.25rem * var(--ui, 1)); }
/* the Both answer's first game ends with the next game and the first lesson, one under the other (5 Nov) */
.ask-go button.end-lesson, .mat .ask-go button.end-lesson { flex: 1 1 100%; width: 100%; min-height: 48px; }
.end-more { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ask-go .end-more button, .mat .ask-go .end-more button { min-width: 0; flex: 1 1 12rem; min-height: 44px; font-size: 1rem; }
.ask-go .end-more button[hidden] { display: none; }
.end-ask { flex: 1 1 100%; }
.end-ask:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .end-up.pop { animation: none; } }
.coins-lines summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.coins-lines[open] summary { margin-bottom: 4px; }
/* a narrow panel: the level-up card's buttons go under its words */
@media (max-width: 600px) {
  .end-up { grid-template-columns: auto 1fr; }
  .end-up-acts { grid-column: 1 / -1; justify-content: stretch; }
  .end-up-acts .end-small { flex: 1 1 0; }
}
.end-prog-rest { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.end-league-row { margin: 0; }
.ask-go .over-first, .ask-go .over-friends { flex: 1 1 100%; }
.ask-body .end-more, .ask-body .end-ask { width: 100%; }
.ask-body .end-more button { min-height: 44px; flex: 1 1 12rem; }
/* Invite a friend (28 Oct; invite.js) */
.end-invite { flex: 1 1 100%; display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: 100%; }
.end-invite .invite-button { min-height: 48px; border-radius: 12px; border: 2px solid #f0c54e; background: rgba(240, 197, 78, 0.12);
  color: #ffe58a; font-weight: 800; font-size: 1.05rem; min-width: 0; padding: 8px 14px; box-shadow: none; }
.end-invite .invite-said { margin: 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.85); text-align: center; }
.end-invite .invite-said:empty { display: none; }
/* the end panel and its bar are solid, so nothing of the table shows through them (28 Oct) */
.table-ask.ask-over, .table .mat #ask.ask-over { background-color: #10241a; background-image: none; }
.table .mat #ask.ask-over .ask-go { background: #10241a; }
.end-bar { background: #08140d; }
/* the Founders (29 Oct; service/founders.py): "You've brought 4 of 10 toward Founder" under the invite button */
.end-invite .invite-founder { margin: 0; font-size: 0.9rem; text-align: center; }
.end-invite .invite-founder a { color: #ffd76a; font-weight: 700; }
