/* Game mode and engine picker shared by /pages/play/find/ and the home page (play-mode-picker.php), moved out of
   matchmaking.css on 2026-11-24. Loaded before matchmaking.css on the play page. */
.match-criteria{--match-option-gap:clamp(.65rem,1.6vw,1.2rem);display:grid;gap:.25rem}
.match-modes{min-width:0;margin:0}
.match-modes legend{float:none;width:auto;margin:0 0 .65rem;font-size:1rem;font-weight:700}
.match-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--match-option-gap)}
.match-play-modes{grid-template-columns:repeat(3,minmax(0,1fr))}
.match-option{
 position:relative;
 display:flex;
 flex-direction:column;
 min-width:0;
 padding:clamp(.7rem,1.65vw,1.15rem);
 border-radius:var(--mt-radius-surface);
 background:var(--mt-bg-secondary);
 box-shadow:var(--mt-elev-1);
}
.match-option:has(> input:checked:not(:disabled)){
 background:linear-gradient(145deg,var(--mt-surface-raised),var(--mt-surface) 75%);
 box-shadow:inset 0 0 0 2px var(--mt-violet),var(--mt-elev-2);
}
.match-option:has(> input:not(:disabled)):hover{background-color:var(--mt-surface-hover)}
.match-option:has(> input:focus-visible){outline:2px solid var(--mt-primary);outline-offset:3px}
.match-option-label{
 flex:1;
 display:flex;
 flex-direction:column;
 align-items:center;
 justify-content:center;
 min-height:4.2rem;
 gap:.45rem;
 text-align:center;
 cursor:pointer;
}
.match-option-label strong{font-size:clamp(.95rem,1.5vw,1.12rem);line-height:1.3}
.match-option-label::after{content:"";position:absolute;inset:0;border-radius:inherit}
.match-option>input:checked:not(:disabled)+.match-option-label::before{
 content:"";position:absolute;inset-block-start:.6rem;inset-inline-end:.6rem;
 width:1.25rem;height:1.25rem;border-radius:50%;
 background:var(--mt-violet) var(--mt-control-check-image) center / 85% no-repeat;
}
.match-option-label small{max-width:27ch;color:var(--mt-text-secondary);font-size:.82rem;line-height:1.35}
.match-option-art{width:clamp(2rem,3.6vw,3rem);height:auto;aspect-ratio:1}
.match-engines .match-option{padding-block:.6rem}
.match-engines .match-option-label{min-height:3.15rem;gap:.3rem}
.match-engines .match-option-art{width:clamp(1.45rem,2.8vw,2rem)}
.match-engines .match-option-label small{max-width:34ch}
.match-criteria:has(#match-mode-solo:checked) .match-engine-group-hint,
.match-criteria:not(:has(#match-mode-solo:checked)) .match-engine-solo-hint{display:none}
.match-option>input:disabled+.match-option-label{cursor:not-allowed;color:var(--mt-text-secondary)}
.match-option>input:disabled+.match-option-label .match-option-art{opacity:.5}
.match-connector{position:relative;height:clamp(2.6rem,4.5vw,3.5rem);pointer-events:none}
.match-criteria:has(.match-engines[hidden]) .match-connector{display:none}
.match-connector-shaft{display:block;width:calc(100% + var(--match-option-gap));height:100%;margin-inline:calc(var(--match-option-gap) / -2);overflow:visible}
.match-connector-shaft path{display:none;fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.match-route-right{stroke:url(#match-choice-gradient-right)}
.match-route-left{stroke:url(#match-choice-gradient-left)}
.match-connector-origin{stop-color:var(--mt-primary)}
.match-connector-middle{stop-color:var(--mt-indigo)}
.match-connector-end{stop-color:var(--mt-violet)}
.match-connector-tip{
 position:absolute;left:calc(25% - var(--match-option-gap) / 4);top:calc(87.5% - 11px);
 width:18px;height:14px;transform:translateX(-50%);fill:none;stroke:var(--mt-violet);
 stroke-width:3;stroke-linecap:round;stroke-linejoin:round;
}
.match-connector-tip.match-route-forge{left:calc(75% + var(--match-option-gap) / 4)}
.match-criteria:has(#match-mode-commander:checked) .match-route-multi,
.match-criteria:has(#match-mode-duel:checked) .match-route-duel,
.match-criteria:has(#match-mode-solo:checked) .match-route-solo{display:inline}
.match-route-manual,.match-route-forge{opacity:.28}
.match-criteria:has(#match-engine-manual:checked) .match-route-manual,
.match-criteria:has(#match-engine-forge:checked:not(:disabled)) .match-route-forge{opacity:1}
.match-criteria:has(#match-engine-forge:disabled) .match-route-forge{display:none}
.match-search-row{
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:clamp(.5rem,1.8vw,1rem);
 width:min(100%,34rem);
 margin:.35rem auto 0;
}
.match-search-row .btn{min-height:3.35rem;font-weight:700}
.match-search-row:has([data-match-create][hidden]){grid-template-columns:minmax(0,1fr);width:min(100%,17rem)}
@media(max-width:767.98px){
 .match-option-label small{font-size:.75rem}
 .match-search-row .btn{padding-inline:.5rem}
}
@media(max-width:575.98px){
 .match-criteria .match-option{padding:.65rem}
 .match-criteria .match-option-label strong{overflow-wrap:anywhere}
 .match-play-modes .match-option-label strong{font-size:clamp(.75rem,3.4vw,.95rem)}
 .match-criteria{--match-option-gap:.5rem}
 .match-play-modes{grid-template-columns:minmax(0,1fr)}
 .match-criteria .match-option{padding:.45rem .75rem;border-radius:.8rem}
 .match-play-modes .match-option-label{flex-direction:row;justify-content:flex-start;gap:.65rem;min-height:2.75rem;padding-inline-end:1.5rem;text-align:start}
 .match-play-modes .match-option-label strong{font-size:.95rem}
 .match-play-modes .match-option-art{width:1.8rem;flex:none}
 .match-connector{display:none}
 .match-engines{margin-top:.75rem}
 .match-engines .match-options{grid-template-columns:minmax(0,1fr)}
 .match-engines .match-option-label{display:grid;grid-template-columns:1.8rem minmax(0,1fr);column-gap:.65rem;row-gap:.15rem;justify-items:start;align-content:center;min-height:3.75rem;text-align:start;padding-inline-end:1.25rem}
 .match-engines .match-option-art{grid-row:1 / 3;width:1.65rem;align-self:center}
 .match-engines .match-option-label strong{font-size:.95rem}
 .match-engines .match-option-label small{grid-column:2;max-width:none;font-size:.78rem}
 .match-search-row{margin-top:.5rem}
 .match-search-row .btn{min-height:2.75rem;font-size:.85rem}
}
