/* 21 questions player. Tokens only (dark mode in tools.css). */
.tool.q21 { gap: 14px; }
.tool .q21-center { text-align: center; }
.tool .u14-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .06); }
.tool .u14-seg button { min-height: 44px; padding: 6px 10px; border-radius: 16px; font-size: 14px; line-height: 18px; font-weight: 800; color: rgb(var(--ink) / .65); transition: background-color .2s ease, color .2s ease; }
.tool .u14-seg button[aria-checked="true"] { background: rgb(var(--ink)); color: var(--bg); }
.tool .q21-packs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -24px; padding: 2px 24px; scroll-padding: 24px; }
.tool .q21-packs::-webkit-scrollbar { display: none; }
.tool .q21-packs button { flex: none; }

.tool .q21-top { display: flex; align-items: center; gap: 4px; min-height: 40px; }
.tool .q21-spacer { flex: 1; }
.tool .q21-count { font-size: 14px; font-weight: 850; color: rgb(var(--ink) / .6); font-variant-numeric: tabular-nums; }
.tool .q21-icon { width: 40px; height: 40px; }

.tool .q21-card { min-height: 250px; align-content: center; gap: 12px; padding: 28px 22px; touch-action: pan-y; }
.tool .q21-card:focus { outline: none; }
.tool .q21-meta { font-size: 12px; line-height: 16px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; color: var(--link); }
.tool .q21-q { font-size: 25px; line-height: 33px; font-weight: 850; letter-spacing: -.01em; color: rgb(var(--ink)); text-wrap: balance; }
.tool .q21-bubble { display: none; justify-self: end; max-width: 88%; text-align: left; padding: 12px 16px; border-radius: 22px 22px 6px 22px; background: var(--ramp); color: #fff; font-size: 18px; line-height: 25px; font-weight: 700; text-wrap: pretty; box-shadow: 0 6px 18px rgb(121 35 192 / .25); }
.tool .q21-copy { display: none; height: 48px; justify-self: end; }
.tool.q21-text .q21-q { display: none; }
.tool.q21-text .q21-bubble { display: block; }
.tool.q21-text .q21-copy { display: inline-flex; flex: none; width: auto; }
.tool.q21-text .q21-card { justify-items: stretch; text-align: left; }
.tool .q21-turn { text-align: center; font-size: 15px; line-height: 22px; font-weight: 650; color: rgb(var(--ink) / .7); }
.tool .q21-turn b { font-weight: 900; color: rgb(var(--ink)); }
.tool .q21-under { display: flex; justify-content: center; }
.tool .q21-pass:disabled { opacity: .45; }
.tool .q21-joined { padding: 10px 14px; border-radius: 14px; background: var(--surface); }

.tool .q21-done { align-items: stretch; }
.tool .q21-big { text-align: center; font-size: 64px; line-height: 68px; font-weight: 950; letter-spacing: -.04em; background: var(--ramp); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tool .q21-donelist, .tool .q21-favs { display: grid; gap: 6px; padding: 4px 12px 14px !important; counter-reset: q; }
.tool .q21-donelist li, .tool .q21-favs li { display: flex; align-items: center; gap: 8px; padding: 10px 6px 10px 14px; border-radius: 14px; background: var(--surface-2); font-size: 15px; line-height: 21px; }
.tool .q21-donelist li span { flex: 1; }
.tool .q21-favs li { padding-right: 14px; }

@media (max-width: 599px) {
  .tool .q21-packs { margin: 0 -16px; padding: 2px 16px; }
  .tool .q21-card { min-height: 270px; padding: 24px 18px; }
  .tool .q21-q { font-size: 23px; line-height: 31px; }
}
/* Round 1 */
.tool .q21-card { min-height: 220px; gap: 10px; }
.tool .q21-card .q21-turn { margin-top: 4px; padding-top: 12px; border-top: 1px solid rgb(var(--ink) / .08); width: 100%; text-align: center; }
.tool.q21-text .q21-card .q21-turn { text-align: left; }
.tool .q21-turn, .tool .q21-count { color: rgb(var(--ink) / .75); }
.tool.q21-text .q21-card { align-content: start; }
.tool .q21-pass { flex: none !important; width: auto !important; padding: 0 18px !important; }
.tool .q21-under { min-height: 40px; }
.tool .q21-followbtn { background: none; box-shadow: none; color: var(--link); }
.tool .q21-card .u14-follow { text-align: inherit; }
@media (max-width: 599px) { .tool .q21-card { min-height: 230px; } }
.tool .q21-card .q21-turn { text-wrap: pretty; }
.tool .q21-card .q21-meta { justify-self: stretch; }
/* Round 2 */
.tool .q21-n { margin-left: 6px; font-size: 12px; font-weight: 850; opacity: .55; font-variant-numeric: tabular-nums; }
.tool .q21-cardacts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tool.q21-text .q21-cardacts { justify-content: flex-end; }
.tool .q21-cardacts .btn { flex: none; width: auto; height: 44px; padding: 0 16px; font-size: 15px; }
.tool .q21-share .tool-icon { width: 20px; height: 20px; }
.tool .q21-followbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 22px; background: rgb(var(--accent) / .1); box-shadow: none; color: var(--link); font-weight: 850; }
.tool .q21-followbtn .tool-icon { width: 18px; height: 18px; }
.tool.q21-text .q21-followbtn { order: 3; }
.tool .q21-same { font-size: 12px; font-weight: 850; padding: 4px 10px; border-radius: 12px; background: rgb(var(--accent) / .14); color: var(--link); margin-left: 8px; white-space: nowrap; }
.tool .u14-ticks i { background: rgb(var(--ink) / .16); }
.tool .q21-more { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.tool .u14-ibtn-show .u14-ibtn-l { display: inline; }
.tool .q21-card .q21-turn { font-size: 15px; font-weight: 750; color: rgb(var(--ink) / .8); }
.tool .q21-more .tool-chips { justify-content: center; }
/* Round 3 */
.tool .q21-count { white-space: nowrap; }
.tool .q21-top .u14-ibtn { flex: none; }
.tool p.q21-same { align-self: flex-start; margin: -4px 0 0 !important; }
.tool .q21-n { opacity: .8; }
.tool .q21-play .u14-keys { font-size: 14px; }
.tool .q21-top-saved { text-align: center; padding: 12px 16px; border-radius: 16px; background: var(--surface); font-size: 16px; line-height: 23px; font-weight: 750; color: rgb(var(--ink)); }
.tool .q21-offer { flex: none; }
.tool .q21-done .tool-actions .btn-secondary { flex: 1 1 auto; }
/* Round 4 */
.tool .q21-offer-row { font-size: 14px; line-height: 20px; font-weight: 700; color: rgb(var(--ink) / .75); padding: 10px 14px; border-radius: 14px; background: var(--surface); }
.tool .q21-offer { display: inline; padding: 0; min-height: 0; background: none; font: inherit; font-weight: 850; color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.tool .u14-actions .q21-next { flex: 1 1 auto !important; width: auto !important; }
.tool.q21-text .q21-copy { order: -1; }
.tool .q21-card { min-height: 270px; }
.tool .q21-bubble { border-radius: 22px 22px 6px 22px; position: relative; }
.tool .q21-top-saved.is-empty { font-size: 14px; font-weight: 700; color: rgb(var(--ink) / .7); }
.tool .q21-turn { color: rgb(var(--ink) / .82); }
/* After round 5 (not re-scored) */
.tool .q21-best::after { content: 'best for text'; margin-left: 6px; font-size: 11px; font-weight: 850; padding: 2px 6px; border-radius: 8px; background: rgb(var(--accent) / .18); color: var(--link); }
.tool .q21-best[aria-pressed="true"]::after { background: rgb(255 255 255 / .2); color: inherit; }
.tool.q21-text .q21-copy { box-shadow: inset 0 0 0 2px rgb(var(--accent) / .5); }
.tool.q21-text .q21-followbtn { order: 3; background: none; min-height: 36px; }

/* Reflow at 320 px (WCAG 1.4.10): rows wrap instead of pushing past the screen edge. Wider screens are unchanged. */
@media (max-width: 374px) {
  .tool .q21-top { flex-wrap: wrap; }
}
