/* Game discovery extends the existing portal palette and card system. */
#games [hidden]{display:none!important}
#game-discovery{margin-bottom:24px;color:var(--ink);font-size:14px;line-height:1.6}
.discovery-fields{display:grid;grid-template-columns:2fr 1fr 1fr;gap:14px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px}
.discovery-fields label{display:flex;min-width:0;flex-direction:column;gap:7px;font-weight:800}
.discovery-fields input,.discovery-fields select,.discovery-manual input{font:inherit;min-height:48px;width:100%;min-width:0;border:1px solid #9eabc2;background:#fff;border-radius:10px;padding:10px 12px;color:var(--ink)}
.discovery-fields input:focus-visible,.discovery-fields select:focus-visible,.discovery-manual input:focus-visible{outline:3px solid #1874c5;outline-offset:3px}
.discovery-views{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.discovery-views button,.discovery-empty button,.discovery-clear,.discovery-card-actions button{font:inherit;min-height:44px;border:1px solid #b8c7d8;border-radius:12px;padding:10px 14px;background:#fff;color:var(--ink);font-weight:750;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:background .15s,border-color .15s}
.discovery-views button:hover,.discovery-card-actions button:hover{background:#edf7ff;border-color:#5086ad}
.discovery-views button[aria-pressed="true"]{background:#183e70;border-color:#183e70;color:white}
.discovery-count{font-variant-numeric:tabular-nums;min-width:22px;padding:0 5px;background:#e6eef9;color:#183e70;border-radius:6px;font-size:12px}
.discovery-local{margin:12px 0 0;color:#53637c;font-size:13px}
.discovery-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:54px;flex-wrap:wrap}
.discovery-status{margin:10px 0;color:#354566;font-weight:650}
.discovery-clear{font-size:13px;background:transparent;border-color:transparent;text-decoration:underline;text-underline-offset:3px}
.discovery-empty{padding:30px 24px;background:#eef7ff;border:1px dashed #7eabc7;border-radius:16px}
.discovery-empty p{margin:0 0 16px;color:#354566;font-size:16px}
.discovery-empty button{background:white}
.discovery-card-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:22px;padding-top:16px;border-top:1px solid var(--line)}
.discovery-card-actions button{font-size:13px;padding-inline:12px;flex:1;white-space:normal;line-height:1.5}
.discovery-card-actions svg{width:18px;height:18px;flex:none;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
.discovery-favorite[aria-pressed="true"]{background:#fff0f4;color:#a12e56;border-color:#d77a97}
.discovery-favorite[aria-pressed="true"] svg{fill:#a12e56;stroke:#a12e56}
.discovery-card-actions button:disabled{opacity:.65;cursor:wait}
.game-details .discovery-last{font-size:12px;line-height:1.5;color:#53637c;margin:12px 0 0}
.discovery-return{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#fff3d6;border:1px solid #edcf86;border-radius:14px;padding:14px 18px;margin-bottom:16px;color:#644717}
.discovery-return-link{min-height:44px;display:inline-flex;align-items:center;font-weight:850;text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere}
.discovery-share-status:empty{display:none}.discovery-share-status{margin:10px 0;color:#354566}
.discovery-manual{display:grid;gap:8px;margin-bottom:16px}
.discovery-manual label{font-weight:800}.discovery-manual input{font-size:14px}
.games-grid:has(.game-card[hidden]){grid-template-columns:repeat(auto-fit,minmax(min(290px,100%),1fr))}
.games-grid:has(.game-card[hidden]) .game-card{max-width:560px;grid-column:auto}
@media(max-width:880px){.games-grid:has(.game-card[hidden]) .game-card.featured{display:flex}.games-grid:has(.game-card[hidden]) .game-card.featured .game-visual{height:248px;min-height:0}}
@media(max-width:620px){.discovery-fields{grid-template-columns:1fr 1fr;padding:16px;gap:12px}.discovery-fields label:first-child{grid-column:1/-1}.discovery-fields select{font-size:14px;padding-inline:8px}.discovery-fields input{font-size:16px}.discovery-views{gap:8px}.discovery-views button{flex:1 1 auto;font-size:13px;padding:10px}.discovery-return{padding:12px 16px}.discovery-local{font-size:13px}.discovery-empty{padding:22px 18px}.discovery-card-actions button{font-size:14px}}
@media(prefers-reduced-motion:reduce){.discovery-views button,.discovery-card-actions button{transition:none}}
