/* Shared game UI (loaded on every active game page). Prefix: g- */

.g-wrap { max-width: 48rem; margin: 0 auto; }
.g-wrap [hidden] { display: none !important; }

.g-controls {
    display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-bottom: 1rem; padding: 1rem 1.25rem;
    background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.g-control { display: flex; flex-direction: column; gap: .25rem; font-weight: 700; flex: 1 1 12rem; }
.g-control select {
    font: inherit; font-weight: 500; min-height: var(--tap); padding: 0 .75rem;
    border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
}

.g-card {
    padding: 1.25rem; background: var(--surface); border: 2px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
@media (min-width: 640px) { .g-card { padding: 1.5rem 2rem; } }
.g-center { text-align: center; }

.g-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; color: var(--ink-soft); font-size: .95rem; margin-bottom: .75rem; }
.g-kind { font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; margin-bottom: .25rem; }
.g-prompt { font-size: clamp(1.3rem, 4.5vw, 1.8rem); margin-bottom: .9rem; outline: none; }

.g-choices { display: grid; gap: .6rem; }
@media (min-width: 640px) { .g-choices--2col { grid-template-columns: 1fr 1fr; } }
.g-choice {
    display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 56px; padding: .6rem 1rem;
    text-align: left; font: inherit; font-weight: 600; color: var(--ink);
    background: var(--surface); border: 2px solid var(--line); border-radius: 12px; cursor: pointer;
}
.g-choice:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.g-choice:disabled { cursor: default; }
.g-choice.is-correct { border-color: #15803d; background: #dcfce7; }
.g-choice.is-wrong { border-color: #b91c1c; background: #fee2e2; }
.g-choice:disabled:not(.is-correct):not(.is-wrong) { opacity: .6; }

.g-tiles { display: flex; flex-wrap: wrap; gap: .5rem; }
.g-tile {
    min-height: var(--tap); padding: .4rem 1rem; font: inherit; font-weight: 700; color: var(--ink); text-align: left;
    background: var(--surface); border: 2px solid var(--line); border-radius: 10px; cursor: pointer;
}
.g-tile:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.g-tile:disabled { opacity: .45; cursor: default; }
.g-tile.is-wrong { border-color: #b91c1c; animation: g-shake .35s ease; }
@keyframes g-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.g-result { font-size: 1.3rem; font-weight: 800; margin: 1rem 0 .4rem; }
.g-result.is-correct, .g-good { color: #15803d; }
.g-result.is-wrong { color: #b91c1c; }
.g-message { min-height: 1.6em; margin: .75rem 0 0; font-weight: 600; }
.g-big { font-size: 3rem; font-weight: 800; line-height: 1; color: var(--accent); margin-bottom: .25rem; }
.g-cheer { font-size: 1.25rem; font-weight: 800; color: var(--accent); }
.g-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1rem; }
.g-ref { color: var(--ink-soft); }
.g-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.g-footnote { max-width: 44rem; margin: 1rem auto 0; font-size: .9rem; text-align: center; }
