/* Alignment pass (update 31): cards that sit side by side in a grid are the same height.
   Pattern everywhere in the app: <ul class="…grid"> <li> <a|button class="…card"> — the <li> stretches to the row,
   so the card inside fills it. Loaded last so it wins. */
:is(.pb-list, .place-grid, .game-grid, .set-list, .phrase-grid, .lm-queue, .hl-grid, .cs-weeks, .cs-word-grid,
    .sb-weeks, .sb-wgrid, .ax-tools, .vb-pron, .week-grid, .hub-grid, .tile-grid, .mod-grid, .pj-cards, .dict-tests,
    .pairs-sets, .song-grid, .sg-grid, .mt-tests, .tool-grid, .hw-tools, .tk-topics, .kr-grid, .fest-grid, .stage-grid,
    .story-grid, .poem-grid, .reader-grid, .gram-grid, .pr-grid, .card-grid) > li { display: grid; }
:is(.pb-list, .place-grid, .game-grid, .set-list, .phrase-grid, .lm-queue, .hl-grid, .cs-weeks, .cs-word-grid,
    .sb-weeks, .sb-wgrid, .ax-tools, .vb-pron, .week-grid, .hub-grid, .tile-grid, .mod-grid, .pj-cards, .dict-tests,
    .pairs-sets, .song-grid, .sg-grid, .mt-tests, .tool-grid, .hw-tools, .tk-topics, .kr-grid, .fest-grid, .stage-grid,
    .story-grid, .poem-grid, .reader-grid, .gram-grid, .pr-grid, .card-grid) > li > :only-child { height: 100%; box-sizing: border-box; }
/* Two panels side by side (conversation coach): same height */
.tk-top-grid, .tk-prep-grid { align-items: stretch; }
/* Pathway: five stages in a row when there is room, otherwise wrap (no sideways scrolling) */
@media (min-width: 900px) { .stage-river { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); } }
.stage-card { min-width: 0; overflow-wrap: anywhere; }
/* Landing page: the five pathway stages sit on one line, with their names and text starting at the same height */
.river-stop { align-content: start; }
.river-grades { font-weight: 700; font-size: .85rem; color: var(--ink-2); margin-bottom: 4px; }
@media (min-width: 900px) { .river-en { min-height: calc(2 * 1.5em); line-height: 1.5; } }
/* Phone top bar for visitors (not signed in): brand, English help, settings and Log in must fit */
@media (max-width: 440px) { .topbar-actions:not(:has(.userchip)) .iconbtn[title='Report a bug or suggest an idea'] { display: none; } .topbar-actions .btn--small { padding-inline: 12px; white-space: nowrap; } }
.child { grid-template-columns: minmax(0, 1fr); } .child > * { min-width: 0; } @media (min-width: 880px) { .child { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
