/* Use Activitoo's shared game-ui.css tokens, panels, controls and focus rules. */
.phrase-rush{display:grid;gap:1rem;max-width:var(--ag-play-width);margin-inline:auto;padding-bottom:var(--ag-page-bottom)}
.phrase-rush [hidden]{display:none!important}.phrase-rush .fr-intro{display:grid;gap:.8rem;background:linear-gradient(135deg,var(--ag-tint),var(--ag-surface))}.phrase-rush .fr-eyebrow{display:flex;justify-content:space-between;gap:.75rem;font-size:.7rem;font-weight:750;letter-spacing:.1em;color:var(--ag-muted)}
.phrase-rush .fr-modes,.phrase-rush .fr-result-actions{display:flex;gap:.65rem;flex-wrap:wrap;align-items:center}.phrase-rush button:not(.activitoo-primary-button),.phrase-rush .fr-modes a{box-sizing:border-box;border:1px solid var(--ag-border);border-radius:var(--ag-control-radius);min-height:44px;padding:.6rem .9rem;background:var(--ag-surface);color:var(--ag-ink);font:600 .9rem/1.35 var(--ag-font);cursor:pointer;text-decoration:none}.phrase-rush .fr-modes [aria-current=page]{background:var(--ag-primary);color:#fff;border-color:var(--ag-primary)}
.phrase-rush .fr-play{display:grid;gap:1.2rem}.phrase-rush .fr-board-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}.phrase-rush .fr-board-head>div{display:grid;gap:.4rem}.phrase-rush .fr-badge{font-size:.8rem;white-space:nowrap;padding:.35rem .6rem;border-radius:99px;background:var(--ag-tint);color:var(--ag-muted)}
.phrase-rush .fr-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.5rem}.phrase-rush .fr-stats>div{display:grid;gap:.25rem;background:var(--ag-tint);border-radius:12px;padding:.8rem;text-align:center}.phrase-rush .fr-stats span{font-size:.65rem;letter-spacing:.07em;font-weight:700;color:var(--ag-muted)}.phrase-rush .fr-stats strong{font-size:1.6rem;color:var(--ag-primary);font-variant-numeric:tabular-nums}
.phrase-rush .fr-board{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:1rem .8rem;padding:1.25rem 0;min-height:110px}.phrase-rush .fr-word{display:grid;grid-template-columns:repeat(var(--letters),minmax(0,1fr));gap:.2rem;width:min(100%,calc(var(--letters)*2rem + (var(--letters) - 1)*.2rem))}.phrase-rush .fr-tile{display:flex;align-items:center;justify-content:center;aspect-ratio:4/5;min-width:0;border:1px solid var(--ag-border);border-bottom:3px solid var(--ag-primary);border-radius:6px;background:var(--ag-tint);font-weight:750;font-size:clamp(.8rem,3.7vw,1.2rem);color:var(--ag-primary-dark)}.phrase-rush .fr-tile.is-open{background:var(--ag-primary);color:#fff;border-color:var(--ag-primary)}
.phrase-rush .fr-feedback{min-height:2.5rem;color:var(--ag-ink);font-weight:600;font-size:.9rem}.phrase-rush .fr-keyboard{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:.35rem;margin-bottom:1.25rem}.phrase-rush .fr-keyboard button{justify-self:stretch;padding:.3rem 0;min-width:0;min-height:44px;font-size:1rem}.phrase-rush .fr-keyboard button.is-hit{background:var(--ag-primary);color:#fff;opacity:1}.phrase-rush .fr-keyboard button.is-miss{background:var(--ag-tint);color:var(--ag-muted);text-decoration:line-through;opacity:.55}
.phrase-rush .fr-solve>div{display:flex;gap:.6rem}.phrase-rush .fr-solve input{min-width:0;flex:1}.phrase-rush .fr-solve button{white-space:nowrap}.phrase-rush .fr-solve>p,.phrase-rush .fr-reveal p{font-size:.78rem;line-height:1.65;color:var(--ag-muted)}.phrase-rush .fr-reveal{margin-top:1rem}.phrase-rush .fr-reveal summary{font-size:.85rem;cursor:pointer;color:var(--ag-muted)}.phrase-rush .fr-reveal p{margin:.75rem 0}.phrase-rush .fr-result{display:grid;gap:1rem;border-top:1px solid var(--ag-border);padding-top:1rem}
/* iOS must never auto-zoom text entry; preserve browser pinch zoom. */
.phrase-rush.activitoo-room-ui :is(input,select,textarea){font-size:max(16px,1em)!important}
@media(max-width:480px){.phrase-rush .fr-solve>div{flex-direction:column}.phrase-rush .fr-solve button{width:100%}.phrase-rush .fr-board-head{align-items:start}.phrase-rush .fr-keyboard{grid-template-columns:repeat(7,minmax(0,1fr))}.phrase-rush .fr-board-head h3{font-size:1rem}.phrase-rush .fr-badge{font-size:.7rem}.phrase-rush .fr-eyebrow{letter-spacing:.05em}}
@media(prefers-reduced-motion:no-preference){.phrase-rush .fr-tile.is-open{animation:fr-reveal .2s ease-out}@keyframes fr-reveal{from{transform:translateY(3px);opacity:.5}to{transform:translateY(0);opacity:1}}}


.phrase-rush .fr-category-picker{max-width:26rem;font-size:.85rem}.phrase-rush .fr-category{font-size:.85rem;font-weight:750;color:var(--ag-primary)}
.phrase-rush .fr-solve-box{border:1px solid var(--ag-border);border-radius:var(--ag-control-radius);padding:.8rem}.phrase-rush .fr-solve-box summary{cursor:pointer;font-weight:700;color:var(--ag-primary);min-height:44px;display:list-item}.phrase-rush .fr-solve-box[open] summary{margin-bottom:.85rem}.phrase-rush .fr-hints{display:grid;gap:.75rem;margin-top:1.1rem;padding-top:1rem;border-top:1px solid var(--ag-border)}.phrase-rush .fr-hints>p,.phrase-rush .fr-score-note{font-size:.78rem;line-height:1.6;color:var(--ag-muted)}.phrase-rush .fr-hint-actions{display:grid;gap:.55rem}.phrase-rush .fr-hint-actions button{width:100%;justify-self:stretch;min-height:44px;text-align:left}.phrase-rush .fr-score-note{margin-top:1rem}

.phrase-rush .fr-difficulties{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}.phrase-rush .fr-difficulties a{display:grid;gap:.25rem;min-height:44px;padding:.75rem;border:1px solid var(--ag-border);border-radius:var(--ag-control-radius);background:var(--ag-surface);color:var(--ag-ink);font-weight:700;text-decoration:none}.phrase-rush .fr-difficulties a[aria-current=page]{border-color:var(--ag-primary);background:var(--ag-tint);box-shadow:inset 0 0 0 1px var(--ag-primary)}.phrase-rush .fr-difficulties small{font-size:.75rem;font-weight:500;color:var(--ag-muted)}
/* Revealed hints: separate label, purchased cost and readable information. */
.phrase-rush .fr-hint-card{display:grid;grid-template-columns:34px minmax(0,1fr);gap:.75rem;align-items:start;padding:1rem;border:1px solid var(--ag-border);border-inline-start:3px solid var(--ag-primary);border-radius:var(--ag-control-radius);background:var(--ag-tint);color:var(--ag-ink);font-family:var(--ag-font)}
.phrase-rush .fr-hint-card--clue{background:var(--ag-surface);border-inline-start-color:var(--ag-focus)}
.phrase-rush .fr-hint-card-icon{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--ag-border);border-radius:10px;background:var(--ag-surface);color:var(--ag-primary)}
.phrase-rush .fr-hint-card-icon svg{width:20px;height:20px}
.phrase-rush .fr-hint-card-content{min-width:0;display:grid;gap:.65rem}
.phrase-rush .fr-hint-card-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.45rem .75rem}
.phrase-rush .fr-hint-card-header h4{display:flex;align-items:baseline;flex-wrap:wrap;gap:.4rem;margin:0;font:750 13px/1.4 var(--ag-font);color:var(--ag-primary-dark)}
.phrase-rush .fr-hint-card-header h4 span{font-size:11px;font-weight:500;color:var(--ag-muted)}
.phrase-rush .fr-hint-cost{padding:.2rem .5rem;border:1px solid var(--ag-border);border-radius:99px;background:var(--ag-surface);font:600 11px/1.4 var(--ag-font);color:var(--ag-muted);white-space:nowrap}
.phrase-rush .fr-hint-card .fr-hint-card-value{margin:0;overflow-wrap:anywhere;font:500 16px/1.65 var(--ag-font);color:var(--ag-ink)}
.phrase-rush .fr-hint-card--category .fr-hint-card-value{font-size:18px;font-weight:750;line-height:1.4;color:var(--ag-primary-dark)}
@media(max-width:380px){.phrase-rush .fr-hint-card{grid-template-columns:28px minmax(0,1fr);padding:.8rem;gap:.6rem}.phrase-rush .fr-hint-card-icon{width:28px;height:28px}.phrase-rush .fr-hint-card-icon svg{width:17px;height:17px}}
@media(prefers-reduced-motion:no-preference){.phrase-rush .fr-hint-card{animation:fr-hint-appear .2s ease-out}@keyframes fr-hint-appear{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}}
/* Shared Activitoo dialog surface; cancel is the safe initial keyboard focus. */
.phrase-rush .fr-confirm-dialog:not([open]){display:none}
.phrase-rush .fr-confirm-dialog{width:min(92vw,460px)}
.phrase-rush .fr-confirm-copy{display:grid;gap:.9rem;padding:var(--ag-panel-space)}
.phrase-rush .fr-confirm-copy h3{font-size:clamp(1.1rem,4vw,1.4rem);line-height:1.35}
.phrase-rush .fr-confirm-copy>p:last-child{font-size:1rem;line-height:1.65;color:var(--ag-muted)}
.phrase-rush .fr-confirm-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:.65rem;padding:1rem var(--ag-panel-space);border-top:1px solid var(--ag-border);background:var(--ag-tint)}
.phrase-rush .fr-confirm-actions button{min-height:44px;min-width:100px}
.phrase-rush .fr-confirm-dialog .activitoo-instructions-dialog-inner{overflow-y:auto}

/* Aggregate score and reset use the same shared controls as the game. */
.phrase-rush .fr-progress-footer{display:flex;align-items:center;justify-content:space-between;gap:1rem;border-top:1px solid var(--ag-border);padding-top:1rem}
.phrase-rush .fr-progress-footer p{max-width:34rem;font-size:.78rem;line-height:1.65;color:var(--ag-muted)}
.phrase-rush .fr-progress-footer button{flex-shrink:0}
@media(max-width:600px){.phrase-rush .fr-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.phrase-rush .fr-progress-footer{align-items:start;flex-direction:column}.phrase-rush .fr-progress-footer button{width:100%}}
