/* EwrekaGames — daily quests strip, result-card rows, rated pill / rating chip, account progress, leaderboards.
 * Every box that appears on a game screen or above the home tiles has a fixed height (no layout shift, board never moves). */

/* ---------- home "Today" strip: fixed 92 px (desktop) / 56 px (phone) ---------- */
.rt-today { display: grid; grid-template-columns: minmax(150px, 1.15fr) repeat(3, minmax(0, 1fr)) minmax(0, 1fr); gap: 10px; height: 92px; margin: 0 0 24px; contain: layout; }
.rt-today > * { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; min-width: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.rt-today .rt-hd { text-decoration: none; color: inherit; }
.rt-today .rt-hd b { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-today .rt-hd span { font-size: 12.5px; color: var(--ink-3); line-height: 1.3; max-height: 2.6em; overflow: hidden; }
/* flex: none: the 92 px column must not shrink the quest text (descenders and the second line were cut) */
.rt-q .t { flex: none; font-size: 13px; font-weight: 600; line-height: 1.25; max-height: 2.5em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rt-q .t em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .03em; }
.rt-q .bar, .rt-qlist .bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; flex: none; }
.rt-q .bar i, .rt-qlist .bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 3px; transition: width .4s var(--ease); }
.rt-q .m { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; height: 16px; line-height: 16px; }
.rt-q .m a { color: var(--brand); font-weight: 700; text-decoration: none; }
.rt-q.ok .bar i, .rt-qlist li.ok .bar i { background: var(--good); }
.rt-q.ok .t { color: var(--ink-2); }
.rt-today .rt-bonus { background: var(--surface-2); }
.rt-today .rt-hd .rt-qn { display: none; }
@media (max-width: 1100px) { .rt-today { grid-template-columns: minmax(140px, 1.2fr) repeat(3, minmax(0, 1fr)); } .rt-today .rt-bonus { display: none; } }
@media (max-width: 760px) {
  .rt-today { grid-template-columns: minmax(0, 1fr); height: 56px; margin: 0 0 16px; }
  .rt-today .rt-q { display: none; }
  .rt-today .rt-hd { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; padding: 8px 14px; }
  .rt-today .rt-hd b { flex: none; font-size: 14px; }
  .rt-today .rt-hd span { white-space: nowrap; text-overflow: ellipsis; max-height: 1.3em; min-width: 0; }
  .rt-today .rt-hd .rt-qn { display: block; flex: none; margin-left: auto; padding: 0 8px; height: 22px; line-height: 22px; max-height: none; border-radius: 11px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-variant-numeric: tabular-nums; }
}

/* ---------- player bar: chip + pill stay on the single 16 px line ---------- */
.pbar .rt-chip, .pbar .rt-pill { flex: none !important; font-size: 11px; line-height: 16px; height: 16px; padding: 0 6px; border-radius: 8px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pbar .rt-chip { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.pbar .rt-pill { background: var(--surface-3); color: var(--ink-3); }
.pbar .rt-pill.on { background: var(--blue-soft); color: var(--blue); }

/* ---------- result card rows (≤ 4 lines of 22 px) ---------- */
.result .box { max-height: 100%; overflow: auto; }
.rt-res { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 2px; }
.rt-res .rt-row { margin: 0; font-size: 13px; line-height: 1.35; min-height: 22px; padding: 2px 0; color: var(--ink-2); overflow-wrap: anywhere; }   /* wave18: wraps instead of an ellipsis ("Mitglieder erhalten in Online-Partien ei…") */
.rt-res .rt-row.up { color: var(--good); font-weight: 600; }
.rt-res .rt-row.ok { color: var(--good); }
.rt-res .rt-row.note { font-size: 12px; color: var(--ink-3); }
.rt-res .rt-badge.sm { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; }

/* ---------- badges ---------- */
.rt-badge { width: 48px; height: 48px; display: block; flex: none; }
.rt-badge.sm { width: 18px; height: 18px; display: inline-block; }
.rt-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rt-bdg { display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.rt-bdg .rt-badge { grid-row: 1 / span 2; }
.rt-bdg b { font-size: 13px; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; hyphens: auto; align-self: end; }   /* wave18: long German titles break inside the tile ("Maschinenbändiger") */
.rt-bdg small { align-self: start; }
.rt-bdg small { font-size: 11.5px; color: var(--ink-3); line-height: 1.25; }
.rt-bdg.off { opacity: .62; }

/* ---------- account page ---------- */
.rt-prog { margin: 22px 0 8px; }
.rt-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rt-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; margin: 12px 0 14px; align-items: start; }
.rt-card { padding: 18px; margin: 0 0 14px; }
.rt-card h3 { margin: 0 0 10px; font-size: 16px; }
.rt-qlist { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rt-qlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "t s a" "b b b"; gap: 4px 10px; align-items: center; font-size: 14px; }
.rt-qlist li > em { grid-area: t; font-style: normal; font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; }
.rt-qlist li > em + span { grid-area: t; padding-left: 52px; }
.rt-qlist li > span:not(.bar) { grid-area: t; }
.rt-qlist li > .bar { grid-area: b; }
.rt-qlist li > small { grid-area: s; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rt-qlist li > a { grid-area: a; color: var(--brand); font-weight: 700; font-size: 13px; }
.rt-sw, .rt-sel { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-weight: 600; font-size: 14px; }
.rt-sw input { width: 18px; height: 18px; accent-color: var(--brand); }
.rt-age { padding-left: 26px; font-weight: 500; }
.rt-sel select { height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); padding: 0 8px; }
.rt-msg { min-height: 18px; }
.rt-guest { margin-top: 22px; }
.rt-guest h2 { font-size: 18px; margin: 0 0 6px; }
.rt-guest h3 { font-size: 15px; margin: 14px 0 8px; }
/* wave18: the account page's general ".acc h3 { margin: 0 }" won over the two rules above (same weight, later file):
   section headings sat right on the paragraph or button above them */
.acc .rt-guest h3 { margin: 22px 0 8px; }
.acc .rt-guest > .acc-small { margin-bottom: 10px; }
.acc .rt-card .acc-tblwrap + .acc-small, .acc .rt-card .acc-tbl + .acc-small { margin-top: 12px; }
.acc .rt-card > .acc-small + .acc-small, .acc .rt-card > ul + .acc-small { margin-top: 8px; }
.acc .acc-card .acc-row + h3 { margin-top: 10px; }   /* + the form grid gap (14 px) */
@media (max-width: 760px) { .rt-cols { grid-template-columns: minmax(0, 1fr); } .rt-badges { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .rt-bdg { grid-template-columns: 40px minmax(0, 1fr); } .rt-bdg .rt-badge { width: 40px; height: 40px; } }
@media (max-width: 400px) { .rt-badges { grid-template-columns: minmax(0, 1fr); } .rt-bdg b { overflow-wrap: anywhere; } }
/* narrow phones: each game of the ratings table is a two-line card (name + rating, then the other columns as small labelled text) */
@media (max-width: 480px) {
  .acc-tbl.rt-tbl thead { display: none; }
  .acc-tbl.rt-tbl, .acc-tbl.rt-tbl tbody { display: block; }
  .acc-tbl.rt-tbl tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
  .acc-tbl.rt-tbl th, .acc-tbl.rt-tbl td { height: auto; padding: 0; border: 0; text-align: left; }
  .acc-tbl.rt-tbl tbody th { flex: 1 0 calc(100% - 92px); min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
  .acc-tbl.rt-tbl td:nth-child(2) { flex: 0 0 80px; text-align: right; font-size: 16px; font-weight: 800; }
  .acc-tbl.rt-tbl td:nth-child(n+3) { font-size: 12px; color: var(--ink-3); }
  .acc-tbl.rt-tbl td:nth-child(n+3)::before { content: attr(data-l) ' '; }
}

/* ---------- leaderboards ---------- */
.rt-lb .rt-lead, .rt-small { color: var(--ink-3); font-size: 14px; }
.rt-lb-games { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.rt-lb-tabs { max-width: 420px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.rt-lb-tabs button.on { background: var(--brand-soft); color: var(--brand); }
.rt-tblwrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.rt-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.rt-tbl th, .rt-tbl td { height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rt-tbl th:nth-child(2), .rt-tbl td:nth-child(2), .rt-tbl th:first-child, .rt-tbl td:first-child { text-align: left; }
.rt-tbl thead th { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.rt-tbl .rt-nm { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.rt-tbl .rt-nm .rt-badge { margin-right: 6px; vertical-align: -3px; }
.rt-tbl tr.sk td { background: linear-gradient(90deg, transparent, var(--surface-2), transparent); }
.rt-pager { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.rt-how { margin: 28px 0; max-width: 720px; }
.rt-how h2 { font-size: 18px; }
@media (max-width: 760px) { .rt-tbl .rt-d { display: none; } }
/* wave18: narrow phones: tighter cells and an earlier ellipsis on the name, so the rating column always fits (never scrolls away) */
@media (max-width: 400px) {
  .rt-tbl th, .rt-tbl td { padding: 0 8px; }
  .rt-tbl .rt-nm { max-width: calc(100vw - 172px); }
}
/* wave18: tap targets (40 px or more) without moving anything around them */
.rt-q .m a, .rt-qlist li > a { display: inline-block; padding: 12px 0 12px 12px; margin: -12px 0 -12px -12px; }
.rt-lb-games .btn.small, .rt-lb-tabs button { height: 40px; }
