/* Games hub */
.hub-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3.5rem;
}

.hub-hero {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hub-kicker {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--brand);
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    background: var(--brand-soft);
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.hub-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0.25rem 0;
    color: var(--brand-dark);
}

.hub-birth {
    color: var(--brand);
    font-size: 1rem;
    font-weight: 500;
    margin: 0.15rem 0 0;
}

.hub-sign {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-top: 0.35rem;
}

.hub-sign span {
    font-size: 1.35rem;
    margin-right: 0.25rem;
}

.hub-tagline {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.game-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--bg-card-border);
    background: var(--surface);
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    min-height: 210px;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), var(--gold));
    opacity: 0.85;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-light);
}

.game-card-match::before { background: linear-gradient(90deg, var(--brand), var(--brand-light)); }
.game-card-trivia::before { background: linear-gradient(90deg, var(--accent-blue), #7ab8e0); }
.game-card-word::before { background: linear-gradient(90deg, var(--earth), #7bc46a); }
.game-card-movie::before { background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }
.game-card-riddles::before { background: linear-gradient(90deg, var(--fire), #f08060); }
.game-card-emoji::before { background: linear-gradient(90deg, var(--accent-pink), #f090b0); }

.game-card-match:hover,
.game-card-trivia:hover,
.game-card-word:hover,
.game-card-movie:hover,
.game-card-riddles:hover,
.game-card-emoji:hover { border-color: var(--border); }

.game-card-movie,
.game-card-riddles,
.game-card-emoji,
.game-card-match,
.game-card-trivia,
.game-card-word { background: var(--surface); }

.game-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background: var(--brand-soft);
    font-size: 1.5rem;
    line-height: 1;
    margin-top: 0.25rem;
}

.game-card-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brand-dark);
    letter-spacing: -0.02em;
}

.game-card-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.55;
    flex: 1;
}

.game-card-play {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--brand);
    margin-top: auto;
    padding-top: 0.5rem;
}

.game-card-locked {
    opacity: 0.72;
}

.game-card-locked:hover {
    transform: none;
    box-shadow: none;
}

.game-card-locked .game-card-play {
    color: #b91c1c;
}

.game-panel-locked {
    text-align: center;
}

.game-locked-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0.5rem;
}

.game-locked-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.game-back-link {
    display: inline-flex;
    margin-top: 0.75rem;
    text-decoration: none;
}

.hub-meetup {
    margin-bottom: 2rem;
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hub-meetup-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

/* Individual game pages */
.game-page-wrap {
    max-width: 640px;
    padding-bottom: 3rem;
}

.game-page-header {
    padding-top: 0.5rem;
}

.game-back {
    margin-bottom: 1rem;
}

.game-back a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.game-back a:hover {
    color: var(--accent-gold);
}

.game-panel {
    background: var(--surface);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.game-panel-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.game-panel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--brand-soft);
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
    color: var(--brand-dark);
}

.game-panel-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
}

.game-panel-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.2rem;
}

.game-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.alert-success {
    background: rgba(111, 168, 74, 0.15);
    border: 1px solid rgba(111, 168, 74, 0.4);
    color: #3d6b1f;
}

/* Quiz question section (progress + prompt) */
.game-question-section {
    margin-bottom: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: linear-gradient(165deg, var(--bg-soft) 0%, var(--surface) 100%);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.game-question-section-head {
    padding: 0.85rem 1.15rem 0.75rem;
    background: var(--bg-warm);
    border-bottom: 1px solid var(--border);
}

.game-question-section-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    margin: 0 0 0.55rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.4;
}

.game-question-section-step {
    color: var(--brand-dark);
    font-weight: 700;
}

.game-question-section-dot {
    color: var(--border);
    font-weight: 400;
}

.game-question-section-score strong {
    color: var(--gold-dark);
    font-weight: 800;
}

.game-question-section-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
}

.game-question-section-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand) 0%, var(--brand-light) 100%);
    transition: width 0.35s ease;
}

.game-question-section-body {
    padding: 1.25rem 1.15rem;
}

.game-question-section-riddle .game-question-section-body,
.game-question-section-movie .game-question-section-body,
.game-question-section-emoji .game-question-section-body {
    text-align: center;
}

.game-question-section .movie-prompt-label,
.game-question-section .emoji-prompt {
    margin: 0 0 0.65rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}

.game-question-section .movie-title-prompt {
    margin: 0;
}

.game-question-section .emoji-display {
    margin: 0;
}

.game-question-section .riddle-text {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
}

/* Legacy round head (kept for compatibility) */
.game-round-head {
    margin-bottom: 1.25rem;
}

.game-round-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.game-round-step {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand);
}

.game-round-of {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: normal;
}

.game-round-score {
    flex-shrink: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: var(--bg-warm);
    border: 1px solid var(--border);
}

.game-round-score strong {
    color: var(--gold-dark);
    font-weight: 800;
}

.game-round-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--bg-warm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.game-round-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand) 0%, var(--brand-light) 100%);
    transition: width 0.35s ease;
}

.game-question-card {
    padding: 1.25rem 1.15rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: linear-gradient(165deg, var(--bg-soft) 0%, var(--surface) 100%);
    box-shadow: var(--shadow-soft);
}

.game-question-card-riddle {
    text-align: center;
}

.game-question-card-movie {
    text-align: center;
}

.game-question-card-emoji {
    text-align: center;
}

.game-question-card .movie-prompt-label,
.game-question-card .emoji-prompt {
    margin-bottom: 0.65rem;
}

.game-question-card .movie-title-prompt {
    margin-bottom: 0;
}

.game-question-card .emoji-display {
    margin-bottom: 0;
}

.game-question-card .riddle-text {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
}

.trivia-progress {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.trivia-question {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
    color: var(--text-primary);
}

.trivia-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.trivia-option {
    padding: 0.9rem 1rem;
    border: 1px solid var(--bg-card-border);
    border-radius: 10px;
    background: var(--bg-soft);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trivia-option:hover {
    border-color: var(--accent-purple);
    background: var(--brand-soft);
}

.trivia-result {
    text-align: center;
    padding: 1rem 0;
}

.trivia-score-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.trivia-score-value {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin: 0.25rem 0 0.5rem;
}

.trivia-score-msg {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Circlos Word */
.word-board {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
    align-items: center;
}

.word-row {
    display: flex;
    gap: 0.35rem;
}

.word-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(2.2rem + (var(--word-len, 5) * 0.1rem));
    height: calc(2.2rem + (var(--word-len, 5) * 0.1rem));
    min-width: 2.4rem;
    min-height: 2.4rem;
    max-width: 3rem;
    max-height: 3rem;
    border: 2px solid var(--bg-card-border);
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--bg-soft);
}

.word-tile.correct {
    background: rgba(143, 188, 106, 0.3);
    border-color: var(--earth);
    color: #3d6b1f;
}

.word-tile.present {
    background: rgba(232, 197, 71, 0.3);
    border-color: var(--accent-gold);
    color: #8a6d00;
}

.word-tile.absent {
    background: var(--brand-soft);
    border-color: var(--border);
    color: var(--text-muted);
}

.word-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    max-width: min(100%, 20rem);
    margin: 0 auto 0.5rem;
}

.word-form .btn-primary {
    width: 100%;
    margin-top: 0;
}

.word-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--bg-card-border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-align: center;
}

.word-hint {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.word-hint-box {
    max-width: 460px;
    margin: 0.75rem auto 0;
    text-align: center;
}

.word-hint-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    list-style: none;
    color: var(--brand);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
}

.word-hint-toggle::-webkit-details-marker {
    display: none;
}

.word-hint-toggle::before {
    content: '💡';
    font-size: 1rem;
}

.word-hint-toggle:hover {
    color: var(--brand-dark);
}

.word-hint-box[open] .word-hint-toggle {
    color: var(--brand-dark);
}

.word-hint-text {
    margin: 0.5rem auto 0;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: var(--brand-soft);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.5;
}

/* Fun game extras */
.game-page-wide {
    max-width: 760px;
}

.game-panel-fun {
    position: relative;
    overflow: hidden;
}

.game-panel-fun::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(104, 84, 248, 0.15), transparent 70%);
    pointer-events: none;
}

.game-panel-riddles::before {
    background: radial-gradient(circle, rgba(255, 150, 100, 0.12), transparent 70%);
}

.game-panel-emoji::before {
    background: radial-gradient(circle, rgba(100, 220, 180, 0.12), transparent 70%);
}

.game-icon-bounce {
    animation: icon-bounce 2s ease infinite;
}

@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes pop-in {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fun-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.pop-in { animation: pop-in 0.4s ease; }
.fun-shake { animation: fun-shake 0.35s ease; }
.wiggle { animation: wiggle 1.5s ease-in-out infinite; }

.fun-win-box,
.fun-lose-box,
.fun-result-box {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 14px;
    margin: 1rem 0;
}

.fun-win-box {
    background: linear-gradient(135deg, rgba(143, 188, 106, 0.2), rgba(232, 197, 71, 0.15));
    border: 1px solid rgba(143, 188, 106, 0.4);
}

.fun-lose-box {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.12), rgba(104, 84, 248, 0.1));
    border: 1px solid rgba(255, 107, 157, 0.3);
}

.fun-result-box {
    background: rgba(104, 84, 248, 0.1);
    border: 1px solid var(--bg-card-border);
}

.fun-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.fun-win-box h2,
.fun-lose-box h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
}

.section-mini-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-purple);
    margin: 1.25rem 0 0.75rem;
    font-weight: 600;
}

.game-panel-movie::before {
    background: radial-gradient(circle, rgba(232, 197, 71, 0.12), transparent 70%);
}

.movie-prompt-label {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.movie-title-prompt {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    padding: 1.25rem 1rem;
    margin-bottom: 1.25rem;
    line-height: 1.35;
    letter-spacing: 0.04em;
    background: rgba(232, 197, 71, 0.08);
    border: 1px solid rgba(232, 197, 71, 0.25);
    border-radius: 14px;
    color: var(--accent-gold);
}

.movie-option {
    text-align: left;
    font-size: 0.95rem;
}

/* Legacy clue UI */
.twenty-meter {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin: 1rem 0 0.5rem;
}

.twenty-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(232, 197, 71, 0.35);
    transition: transform 0.2s ease, background 0.2s ease;
}

.twenty-dot.used {
    background: var(--accent-gold);
    transform: scale(0.85);
}

.twenty-remaining {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.twenty-remaining strong {
    color: var(--accent-gold);
    font-size: 1.1rem;
}

.twenty-log {
    background: var(--surface);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.twenty-log-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.twenty-log-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--bg-card-border);
    font-size: 0.88rem;
}

.twenty-log-q {
    color: var(--text-muted);
    text-align: left;
}

.twenty-badge {
    flex-shrink: 0;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.twenty-badge.yes {
    background: rgba(143, 188, 106, 0.25);
    color: #b8e0a0;
}

.twenty-badge.no {
    background: rgba(255, 107, 107, 0.2);
    color: #b91c1c;
}

.twenty-questions-grid {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.twenty-q-btn {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--bg-card-border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.88rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.twenty-q-btn:hover:not(:disabled) {
    border-color: var(--accent-gold);
    background: rgba(232, 197, 71, 0.1);
    transform: translateX(4px);
}

.twenty-q-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.twenty-guess-box {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--bg-card-border);
}

.twenty-guess-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.twenty-guess-form .field-input {
    flex: 1;
    min-width: 160px;
}

/* Riddles */
.riddle-text {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-style: italic;
    line-height: 1.5;
    text-align: center;
    margin: 1.25rem 0 1.5rem;
    padding: 1rem;
    border-left: 3px solid var(--accent-gold);
    background: rgba(232, 197, 71, 0.06);
    border-radius: 0 10px 10px 0;
}

.riddle-option:hover {
    border-color: var(--accent-gold);
}

/* Emoji Quiz */
.emoji-prompt {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.emoji-display {
    font-size: 3.5rem;
    text-align: center;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
    letter-spacing: 0.15em;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--bg-card-border);
}

.emoji-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.emoji-opt-icon {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .hub-wrap,
    .game-page-wrap {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .game-card {
        min-height: auto;
        padding: 1.15rem 1rem;
        touch-action: manipulation;
    }

    .game-card-title {
        font-size: 1.25rem;
    }

    .hub-meetup-actions {
        grid-template-columns: 1fr;
    }

    .game-panel {
        padding: 1.25rem 1rem;
    }

    .game-panel-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .game-panel-title {
        font-size: 1.45rem;
    }

    .trivia-option,
    .riddle-option,
    .emoji-option,
    .movie-option,
    .twenty-q-btn {
        min-height: 48px;
        font-size: 1rem;
        touch-action: manipulation;
    }

    .trivia-question {
        font-size: 1.15rem;
    }

    .game-question-section-head {
        padding: 0.75rem 1rem 0.65rem;
    }

    .game-question-section-body {
        padding: 1.1rem 1rem;
    }

    .game-question-section-meta {
        font-size: 0.92rem;
    }

    .word-input {
        font-size: 1rem;
        min-height: 48px;
        width: 100%;
    }

    .word-tile {
        min-width: 2.15rem;
        min-height: 2.15rem;
        font-size: 0.95rem;
    }

    .movie-title-prompt {
        font-size: 1.45rem;
        padding: 1rem 0.75rem;
        word-break: break-word;
    }

    .game-page-wide {
        overflow-x: hidden;
    }
}

@media (max-width: 560px) {
    .hub-title {
        font-size: 1.85rem;
    }

    .hub-tagline {
        font-size: 0.95rem;
        padding-inline: 0.25rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .game-card {
        min-height: auto;
    }

    .history-item {
        align-items: flex-start;
    }

    .twenty-guess-form {
        flex-direction: column;
    }

    .word-row {
        gap: 0.25rem;
    }

    .word-tile {
        min-width: 1.85rem;
        min-height: 1.85rem;
        max-width: 2.5rem;
        max-height: 2.5rem;
        font-size: 0.85rem;
    }

    .emoji-display {
        font-size: 2.5rem;
        letter-spacing: 0.08em;
    }

    .trivia-score-value {
        font-size: 2.5rem;
    }
}

/* Match game page */
.match-page-wrap {
    max-width: 820px;
    padding-bottom: 3.5rem;
}

.match-panel .game-panel-header {
    margin-bottom: 1.25rem;
}

.match-type-toggle {
    margin-bottom: 1rem;
}

.match-target-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.35rem;
    background: var(--bg-warm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.match-target-btn {
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.match-target-btn:hover {
    color: var(--brand-dark);
    background: rgba(255, 255, 255, 0.6);
}

.match-target-btn.active {
    background: var(--surface);
    color: var(--brand-dark);
    box-shadow: var(--shadow-soft);
}

.match-grid-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.match-pair-row {
    margin-bottom: 0;
}

.match-sign-column {
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.match-sign-column.is-active {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.match-sign-column .sign-card {
    display: flex;
    margin-bottom: 0.75rem;
    background: var(--brand-soft);
}

.match-sign-column .sign-select {
    margin-bottom: 0.5rem;
}

.match-panel-footer {
    margin-top: 1.5rem;
    padding-top: 0.25rem;
}

.match-result-panel {
    margin-top: 1.25rem;
    text-align: left;
}

.match-result-panel.result-card {
    margin-top: 1.25rem;
    padding: 2rem;
}

.match-result-top {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.match-result-copy .result-header {
    margin-bottom: 0.5rem;
    text-align: left;
}

.match-result-copy .result-pair {
    font-size: 1.65rem;
}

.match-result-copy .score-label {
    margin-bottom: 0;
    text-align: left;
}

.match-result-panel .score-insight {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}

.match-result-panel .element-tags {
    justify-content: flex-start;
    margin-bottom: 1.5rem;
}

.match-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
}

.match-result-actions .share-btn,
.match-result-actions .btn-secondary {
    margin: 0;
}

.match-icebreakers {
    margin: 1.75rem 0 1.5rem;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: linear-gradient(145deg, var(--gold-soft), var(--bg-soft));
}

.match-icebreakers.hidden {
    display: none;
}

.match-icebreakers-head {
    margin-bottom: 1.25rem;
}

.match-icebreakers-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 0.4rem;
}

.match-icebreakers-intro {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

.icebreaker-card {
    padding: 1.25rem 1.35rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    margin-bottom: 1rem;
}

.icebreaker-turn-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 0.65rem;
}

.icebreaker-question {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-primary);
    margin: 0;
}

.match-icebreaker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.match-icebreaker-actions .btn-primary,
.match-icebreaker-actions .btn-secondary {
    margin: 0;
    flex: 1 1 160px;
}

.match-icebreaker-type-toggle {
    margin-bottom: 1rem;
}

.meet-icebreakers {
    margin-top: 0;
    margin-bottom: 1.75rem;
}

@media (max-width: 768px) {
    .match-page-wrap {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .match-result-top {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .match-result-copy .result-header,
    .match-result-copy .score-label {
        text-align: center;
    }

    .match-result-panel .score-insight {
        text-align: center;
    }

    .match-result-panel .element-tags {
        justify-content: center;
    }

    .match-result-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .match-result-actions .share-btn,
    .match-result-actions .btn-secondary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .match-grid-section {
        padding: 1rem 0.75rem;
    }

    .match-sign-column {
        padding: 0.85rem;
    }
}
