/* Hub giochi Pianta.land — cruscotto, classifica, profilo */

[hidden] {
    display: none !important;
}

body[data-gaming-game="hub"] {
    overflow-x: hidden;
    max-width: 100%;
}

body[data-gaming-game="hub"] header {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.gaming-dashboard {
    max-width: min(980px, 100%);
    margin: 0 auto;
    padding: 0 16px 24px;
    display: grid;
    gap: 20px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.gaming-dashboard > * {
    min-width: 0;
    max-width: 100%;
}

.gaming-profile-root,
.gaming-hub-main {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.gaming-hub-main {
    display: grid;
    gap: 20px;
}

.gaming-hub-main > .gaming-panel,
.gaming-hub-main > section {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.gaming-panel {
    background: var(--bg-soft, #f7faf4);
    border: 2px solid var(--green-dark, #0c5505);
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.gaming-panel h2 {
    margin: 0 0 12px;
    font-size: 1.25rem;
    color: var(--green-dark, #0c5505);
}

.gaming-leaderboard-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gaming-leaderboard-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(12, 85, 5, 0.12);
    font-size: 0.95rem;
    position: relative;
    will-change: transform;
}

.gaming-lb-row--climb {
    animation: gaming-rank-climb 1.4s ease;
}

.gaming-lb-row--you {
    background: rgba(255, 215, 0, 0.12);
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 6px;
}

.gaming-lb-avatar {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.gaming-lb-avatar img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(12, 85, 5, 0.35);
}

.gaming-lb-points--tick {
    animation: gaming-points-tick 0.9s ease;
}

.gaming-lb-points--tick-down {
    animation: gaming-points-tick-down 0.9s ease;
    color: #a33;
}

@keyframes gaming-points-tick-down {
    0% { transform: scale(1); }
    35% { transform: scale(1.12); color: #a33; }
    100% { transform: scale(1); }
}

.gaming-leaderboard-hint {
    margin: 0 0 6px;
    font-size: 0.82rem;
    color: #666;
}

.gaming-leaderboard-countdown {
    margin: 0 0 10px;
    font-size: 0.82rem;
    color: var(--green-dark, #0c5505);
    font-weight: 600;
}

.gaming-leaderboard-countdown:empty {
    display: none;
}

.gaming-user-rank-compact {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(12, 85, 5, 0.07);
    border-radius: 8px;
    font-size: 0.88rem;
    max-width: 320px;
}

.gaming-user-rank-compact strong {
    font-size: 1.15rem;
    color: var(--green-dark, #0c5505);
}

.gaming-user-rank-detail {
    color: #555;
    font-size: 0.8rem;
    flex-basis: 100%;
}

.gaming-user-rank--top {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(184, 134, 11, 0.35);
}

.gaming-user-rank--climb {
    animation: gaming-rank-climb 1.2s ease;
}

@keyframes gaming-rank-climb {
    0% { background-color: rgba(76, 175, 80, 0.35); }
    40% { background-color: rgba(76, 175, 80, 0.2); }
    100% { background-color: transparent; }
}

@keyframes gaming-points-tick {
    0% { transform: scale(1); color: #b8860b; }
    35% { transform: scale(1.12); color: #2e7d32; }
    100% { transform: scale(1); color: #b8860b; }
}

.gaming-leaderboard-list li:last-child {
    border-bottom: none;
}

.gaming-leaderboard-rank {
    min-width: 2rem;
    font-weight: 700;
    color: var(--green-dark, #0c5505);
}

.gaming-leaderboard-name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gaming-leaderboard-points {
    font-weight: 700;
    color: #b8860b;
    flex-shrink: 0;
    white-space: nowrap;
}

.gaming-leaderboard-empty {
    margin: 0;
    color: #555;
    font-size: 0.92rem;
}

.gaming-profile-root {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gaming-profile-step-desc {
    margin: 0 0 12px;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.4;
}

.gaming-profile-step-desc--lead {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
}

.gaming-register-pitch {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(12, 85, 5, 0.06), rgba(255, 215, 0, 0.1));
    border: 1px solid rgba(12, 85, 5, 0.2);
}

.gaming-register-pitch__title {
    margin: 0 0 8px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--green-dark, #0c5505);
}

.gaming-register-pitch__title--rules {
    margin-top: 14px;
    font-size: 0.88rem;
    color: #444;
}

.gaming-register-pitch__list {
    margin: 0;
    padding: 0 0 0 1.15rem;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #444;
}

.gaming-register-pitch__list li {
    margin-bottom: 6px;
}

.gaming-register-pitch__list li:last-child {
    margin-bottom: 0;
}

.gaming-register-pitch__list--compact {
    font-size: 0.82rem;
    color: #555;
}

.gaming-register-pitch__list strong {
    color: var(--green-dark, #0c5505);
    font-weight: 700;
}

.gaming-register-otp {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px dashed rgba(12, 85, 5, 0.25);
}

.gaming-register-otp-sent {
    margin: 0;
    font-size: 0.86rem;
    color: #444;
    line-height: 1.45;
}

.gaming-register-otp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.gaming-register-switch {
    margin: 12px 0 0;
    text-align: center;
}

.gaming-link-btn {
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--green-dark, #0c5505);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gaming-link-btn:hover {
    filter: brightness(1.1);
}

.gaming-register-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px dashed rgba(12, 85, 5, 0.25);
}

.gaming-field-hint {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: #666;
    line-height: 1.35;
}

.gaming-field-readonly {
    margin: 4px 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--green-dark, #0c5505);
    word-break: break-all;
}

.gaming-field-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
}

.gaming-profile-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.gaming-btn-primary {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 9px 16px;
    border: none;
    border-radius: 8px;
    background: var(--green-dark, #0c5505);
    color: #fff;
    cursor: pointer;
}

.gaming-btn-primary:hover {
    filter: brightness(1.08);
}

.gaming-btn-ghost {
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    border: 2px dashed rgba(12, 85, 5, 0.45);
    background: transparent;
    color: var(--green-dark, #0c5505);
    cursor: pointer;
}

.gaming-btn-ghost--inline {
    padding: 4px 10px;
    font-size: 0.82rem;
}

.gaming-profile-bar {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 2px solid var(--green-dark, #0c5505);
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(12, 85, 5, 0.06), rgba(255, 215, 0, 0.1));
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.gaming-profile-bar__main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    cursor: default;
    text-align: left;
    font-family: inherit;
    min-width: 0;
}

.gaming-profile-bar__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f0e4;
    border: 2px solid var(--green-dark, #0c5505);
    overflow: hidden;
    font-size: 1.1rem;
}

.gaming-profile-bar__avatar img,
.gaming-profile-bar__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gaming-profile-bar__avatar-fallback {
    line-height: 1;
}

.gaming-profile-bar__avatar-img[hidden],
.gaming-profile-bar__avatar-fallback[hidden] {
    display: none !important;
}

.gaming-profile-bar__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gaming-profile-bar__name {
    font-size: 0.95rem;
    color: var(--green-dark, #0c5505);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gaming-profile-bar__meta {
    font-size: 0.78rem;
    color: #555;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.gaming-profile-bar__sep {
    opacity: 0.5;
}

.gaming-user-rank-inline {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.gaming-user-rank-inline strong {
    color: var(--green-dark, #0c5505);
}

.gaming-user-rank-inline .gaming-user-rank-detail {
    font-size: 0.72rem;
}

.gaming-menu-tile-ver {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
    line-height: 1.2;
    pointer-events: none;
}

.gaming-menu-tile-ver--beta {
    background: rgba(180, 90, 0, 0.9);
    letter-spacing: 0.04em;
}

.gaming-profile-bar__edit {
    width: 44px;
    flex-shrink: 0;
    border: none;
    border-left: 1px solid rgba(12, 85, 5, 0.2);
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--green-dark, #0c5505);
}

.gaming-profile-bar__edit:hover {
    background: rgba(12, 85, 5, 0.08);
}

.gaming-profile-complete-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.gaming-profile-complete-fields {
    flex: 1;
    min-width: 180px;
}

.gaming-profile-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.gaming-profile-edit-head h2 {
    margin: 0;
}

.gaming-profile-edit-actions {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 51, 0, 0.12);
}

.gaming-profile-logout-btn {
    width: 100%;
    justify-content: center;
    color: #7a2e2e;
    border-color: rgba(122, 46, 46, 0.35);
}

.gaming-field--compact {
    margin-bottom: 8px;
}

.gaming-points-inline {
    font-size: 0.88rem;
    margin-top: 4px;
}

.gaming-points-inline strong {
    font-size: 1.05rem;
    color: #b8860b;
}

.gaming-avatar--sm,
.gaming-avatar-placeholder--sm {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

.gaming-avatar-action-btn--sm {
    font-size: 0.78rem;
    padding: 5px 9px;
}

.gaming-avatar-suggest-btn--sm {
    width: 48px;
    height: 48px;
}

.gaming-avatar-wrap--compact {
    max-width: 200px;
}

.gaming-profile-step.gaming-panel {
    padding: 12px 14px;
}

.gaming-profile-step.gaming-panel h2 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.gaming-profile-grid {
    display: grid;
    gap: 16px;
}

@media (min-width: 640px) {
    .gaming-dashboard-top {
        grid-template-columns: 1fr 1fr;
    }

    .gaming-profile-grid {
        grid-template-columns: auto 1fr;
        align-items: start;
    }
}

.gaming-dashboard-top {
    display: grid;
    gap: 20px;
}

.gaming-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.gaming-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--green-dark, #0c5505);
    background: #e8f0e4;
}

.gaming-avatar-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 3px dashed var(--green-dark, #0c5505);
    background: #e8f0e4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.gaming-avatar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 4px;
}

.gaming-avatar-action-btn {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 8px;
    border: 2px solid var(--green-dark, #0c5505);
    background: #fff;
    color: var(--green-dark, #0c5505);
    cursor: pointer;
}

.gaming-avatar-action-btn:hover {
    background: rgba(12, 85, 5, 0.08);
}

.gaming-avatar-action-btn--ghost {
    border-style: dashed;
    font-weight: 500;
}

.gaming-avatar-hint {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: #555;
    text-align: center;
    max-width: 260px;
    line-height: 1.35;
}

.gaming-avatar-suggestions {
    margin-top: 10px;
    text-align: center;
    width: 100%;
    max-width: 280px;
}

.gaming-avatar-suggest-label {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--green-dark, #0c5505);
}

.gaming-avatar-suggest-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 8px;
}

.gaming-avatar-suggest-btn {
    padding: 0;
    border: 2px solid #ccc;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    overflow: hidden;
    cursor: pointer;
    background: #e8f0e4;
    transition: border-color 0.15s, transform 0.15s;
}

.gaming-avatar-suggest-btn:hover {
    border-color: var(--green-dark, #0c5505);
    transform: scale(1.05);
}

.gaming-avatar-suggest-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gaming-field {
    margin-bottom: 12px;
}

.gaming-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.gaming-field input[type="text"],
.gaming-field input[type="email"] {
    width: 100%;
    max-width: 320px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

.gaming-field input[type="file"] {
    max-width: 100%;
    font-size: 0.85rem;
}

.gaming-points-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #333;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
}

.gaming-prize-banner {
    background: linear-gradient(135deg, rgba(12, 85, 5, 0.08), rgba(255, 215, 0, 0.15));
    border-color: #b8860b;
}

.gaming-prize-banner p {
    margin: 0;
    line-height: 1.5;
}

.gaming-status {
    font-size: 0.88rem;
    color: #555;
    margin: 8px 0 0;
}

.gaming-status--ok {
    color: #2e7d32;
}

.gaming-status--warn {
    color: #c62828;
}

.gaming-otp-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(12, 85, 5, 0.25);
}

.gaming-otp-block button {
    margin-top: 8px;
    padding: 8px 14px;
    background: var(--green-dark, #0c5505);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.65;
}

.menu-tile--soon {
    opacity: 0.72;
    pointer-events: none;
}

.menu-tile .gaming-badge-soon {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(12, 85, 5, 0.12);
    color: var(--green-dark, #0c5505);
    border-radius: 4px;
}

/* Giocatori online */
.gaming-online-hint {
    margin: 0 0 10px;
    font-size: 0.82rem;
    color: #666;
}

.gaming-online-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.gaming-online-head h2 {
    margin: 0;
    flex: 1;
    min-width: 0;
}

.gaming-online-count {
    flex-shrink: 0;
    min-width: 1.75rem;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--green-dark, #0c5505);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.gaming-online-count[hidden] {
    display: none !important;
}

.gaming-online-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gaming-online-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(12, 85, 5, 0.12);
    position: relative;
    will-change: transform, opacity;
}

.gaming-online-row--enter {
    animation: gaming-online-enter 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gaming-online-row--leave {
    animation: gaming-online-leave 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

@keyframes gaming-online-enter {
    0% {
        opacity: 0;
        transform: translateY(-10px);
        background-color: rgba(76, 175, 80, 0.32);
    }
    55% {
        opacity: 1;
        transform: translateY(0);
        background-color: rgba(76, 175, 80, 0.16);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        background-color: transparent;
    }
}

@keyframes gaming-online-leave {
    0% {
        opacity: 1;
        transform: translateX(0);
        background-color: transparent;
    }
    100% {
        opacity: 0;
        transform: translateX(14px);
        background-color: rgba(163, 51, 51, 0.08);
    }
}

.gaming-online-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(12, 85, 5, 0.08);
    border-radius: 50%;
}

.gaming-online-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gaming-online-name {
    font-weight: 600;
    color: var(--green-dark, #0c5505);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gaming-online-game {
    font-size: 0.82rem;
    color: #555;
}

.gaming-btn--small {
    padding: 6px 12px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.gaming-online-empty {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.gaming-join-dialog {
    border: 2px solid var(--green-dark, #0c5505);
    border-radius: 10px;
    padding: 0;
    max-width: min(480px, calc(100vw - 32px));
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.gaming-join-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.gaming-join-dialog-inner {
    padding: 18px 20px 16px;
    position: relative;
}

.gaming-join-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #444;
}

.gaming-join-dialog h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: var(--green-dark, #0c5505);
    padding-right: 28px;
}

.gaming-join-target {
    margin: 0 0 12px;
    font-size: 0.9rem;
    color: #555;
}

.gaming-join-dialog textarea {
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid rgba(12, 85, 5, 0.35);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}

.gaming-join-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.gaming-online-row--you {
    background: rgba(12, 85, 5, 0.06);
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 8px;
}

.gaming-online-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(12, 85, 5, 0.35);
}

.gaming-online-pending {
    font-size: 0.78rem;
    color: #666;
    white-space: nowrap;
}

/* Mobile — hub giochi (base compatta ~480px, scroll orizzontale sotto) */
@media (max-width: 639px) {
    body[data-gaming-game="hub"] .gaming-dashboard {
        max-width: min(480px, 100%);
        width: 100%;
        padding: 0 8px 20px;
        gap: 12px;
    }

    .gaming-hub-main {
        gap: 12px;
    }

    #gaming-hub-main .menu-grid {
        padding: 8px 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        grid-template-columns: minmax(0, 1fr);
    }

    #gaming-hub-main .menu-tile,
    #gaming-hub-main .menu-tile figure {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .gaming-panel {
        padding: 10px 12px;
    }

    .gaming-panel h2 {
        font-size: 1.05rem;
        line-height: 1.25;
    }

    .gaming-online-head {
        margin-bottom: 10px;
    }

    .gaming-online-count {
        font-size: 0.78rem;
        padding: 2px 8px;
    }

    .gaming-leaderboard-hint,
    .gaming-online-hint,
    .gaming-leaderboard-countdown {
        font-size: 0.76rem;
        line-height: 1.35;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .gaming-profile-bar__main {
        padding: 6px 8px;
        gap: 6px;
    }

    .gaming-profile-bar__avatar {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }

    .gaming-profile-bar__name {
        font-size: 0.88rem;
    }

    .gaming-profile-bar__meta {
        font-size: 0.68rem;
        line-height: 1.3;
        gap: 2px 4px;
    }

    .gaming-user-rank-inline {
        min-width: 0;
        max-width: 100%;
    }

    .gaming-user-rank-inline .gaming-user-rank-detail {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }

    .gaming-profile-bar__edit {
        width: 36px;
        font-size: 0.95rem;
    }

    .gaming-register-pitch {
        padding: 8px 10px;
    }

    .gaming-register-pitch__list {
        font-size: 0.8rem;
        padding-left: 1rem;
    }

    .gaming-field input[type="text"],
    .gaming-field input[type="email"] {
        max-width: 100%;
        box-sizing: border-box;
    }

    .gaming-lb-row--you,
    .gaming-online-row--you {
        margin: 0;
        padding-left: 4px;
        padding-right: 4px;
    }

    .gaming-leaderboard-list li {
        flex-wrap: nowrap;
        gap: 6px;
        padding: 6px 0;
        font-size: 0.82rem;
    }

    .gaming-lb-avatar,
    .gaming-lb-avatar img {
        width: 24px;
        height: 24px;
    }

    .gaming-leaderboard-rank {
        min-width: 1.35rem;
        font-size: 0.82rem;
    }

    .gaming-leaderboard-name {
        flex: 1 1 auto;
    }

    .gaming-leaderboard-points {
        margin-left: 0;
        flex-shrink: 0;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .gaming-online-row {
        flex-wrap: nowrap;
        align-items: center;
        gap: 6px;
        padding: 8px 0;
    }

    .gaming-online-avatar,
    .gaming-online-avatar img {
        width: 28px;
        height: 28px;
    }

    .gaming-online-main {
        flex: 1 1 auto;
        min-width: 0;
    }

    .gaming-online-game {
        font-size: 0.74rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gaming-online-invite {
        flex-shrink: 0;
        padding: 5px 8px;
        font-size: 0.74rem;
    }

    .gaming-online-pending {
        flex-shrink: 0;
        font-size: 0.72rem;
    }

    .gaming-join-dialog {
        width: calc(100% - 16px);
        max-width: 480px;
        margin: auto;
    }

    .gaming-join-dialog-inner {
        padding: 14px 16px 12px;
    }

    .gaming-join-actions {
        flex-direction: column-reverse;
    }

    .gaming-join-actions .gaming-btn-primary,
    .gaming-join-actions .gaming-btn-ghost {
        width: 100%;
        text-align: center;
    }

    .gaming-user-rank-compact {
        max-width: 100%;
    }
}

@media (max-width: 479px) {
    #gaming-leaderboard {
        min-width: 0;
        max-width: 100%;
    }

    .gaming-leaderboard-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x pan-y;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    .gaming-leaderboard-list li {
        min-width: 448px;
        width: max-content;
        max-width: none;
        box-sizing: border-box;
    }

    .gaming-leaderboard-name {
        min-width: 7rem;
        flex: 1 1 auto;
    }

    .gaming-leaderboard-points {
        position: sticky;
        right: 0;
        z-index: 2;
        margin-left: auto;
        padding: 4px 0 4px 14px;
        background: var(--bg-soft, #f7faf4);
        box-shadow: -10px 0 14px -8px var(--bg-soft, #f7faf4);
    }

    .gaming-lb-row--you .gaming-leaderboard-points {
        background: rgba(255, 215, 0, 0.12);
        box-shadow: -10px 0 14px -8px rgba(255, 215, 0, 0.12);
    }

    #gaming-online,
    .gaming-online-list {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }

    #gaming-profile-bar {
        min-width: 0;
        max-width: 100%;
    }
}

/* Cruciverba — campo di gioco full-screen */
body.gaming-cw-play {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100dvh;
    height: -webkit-fill-available;
    max-height: 100dvh;
    background: #1a2e14;
    font-family: 'Lora', Georgia, serif;
    overscroll-behavior: none;
}

body.gaming-cw-play--immersive {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}

html:fullscreen body.gaming-cw-play,
html:-webkit-full-screen body.gaming-cw-play {
    background: #1a2e14;
}

body.gaming-cw-play--native-fs .gaming-cw-app {
    inset: 0;
}

body.gaming-cw-play .gaming-cw-gate {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(160deg, #0c5505 0%, #1a2e14 100%);
    color: #fff;
    text-align: center;
}

body.gaming-cw-play .gaming-cw-gate-inner {
    max-width: 360px;
}

body.gaming-cw-play .gaming-cw-gate h1 {
    margin: 0 0 12px;
    font-size: 1.35rem;
    color: var(--yellow-accent, #ffd700);
}

body.gaming-cw-play .gaming-cw-gate p {
    margin: 0 0 20px;
    line-height: 1.5;
    font-size: 0.95rem;
}

body.gaming-cw-play .gaming-cw-gate a {
    color: var(--yellow-accent, #ffd700);
}

body.gaming-cw-play .gaming-cw-gate-btn {
    display: inline-block;
}

.gaming-cw-app {
    position: fixed;
    inset: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.gaming-cw-menu-fab {
    position: fixed;
    top: calc(max(env(safe-area-inset-top, 0px), var(--gaming-cw-vv-top, 0px)) + 8px);
    left: calc(max(env(safe-area-inset-left, 0px), var(--gaming-cw-vv-left, 0px)) + 8px);
    z-index: 10055;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 215, 0, 0.55);
    border-radius: 10px;
    background: rgba(12, 85, 5, 0.92);
    color: var(--yellow-accent, #ffd700);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.gaming-cw-menu-fab[aria-expanded="true"] {
    opacity: 0;
    pointer-events: none;
}

.gaming-cw-hud-tr {
    position: fixed;
    top: calc(max(env(safe-area-inset-top, 0px), var(--gaming-cw-vv-top, 0px)) + 8px);
    right: calc(max(env(safe-area-inset-right, 0px), var(--gaming-cw-vv-right, 0px)) + 8px);
    z-index: 10055;
    pointer-events: none;
}

.gaming-cw-timer-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 5px;
}

.gaming-cw-bonus-badge {
    flex-shrink: 0;
    padding: 8px 10px;
    border: 2px solid var(--yellow-accent, #ffd700);
    border-radius: 10px;
    background: linear-gradient(145deg, #ffd700 0%, #ffb300 100%);
    color: var(--green-dark, #0c5505);
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.35);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.gaming-cw-bonus-badge--gone {
    animation: gaming-cw-badge-vanish 0.55s ease-out forwards;
    pointer-events: none;
}

@keyframes gaming-cw-badge-vanish {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.2) translateY(8px); }
}

.gaming-cw-countdown {
    min-width: 64px;
    padding: 8px 12px;
    border: 2px solid rgba(255, 215, 0, 0.55);
    border-radius: 10px;
    background: rgba(12, 85, 5, 0.92);
    color: var(--yellow-accent, #ffd700);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    transform-origin: center center;
}

.gaming-cw-provisional {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    min-width: 44px;
    padding: 8px 10px;
    border: 2px solid rgba(255, 215, 0, 0.35);
    border-radius: 10px;
    background: rgba(12, 85, 5, 0.88);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.gaming-cw-provisional-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--yellow-accent, #ffd700);
    font-variant-numeric: tabular-nums;
}

.gaming-cw-provisional-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: lowercase;
    opacity: 0.85;
}

.gaming-cw-countdown-value {
    letter-spacing: 0.04em;
}

.gaming-cw-countdown--warn {
    border-color: #ff8a65;
    color: #ffccbc;
    animation: gaming-cw-clock-heartbeat 0.9s ease-in-out infinite;
}

.gaming-cw-countdown--expired {
    border-color: rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.65);
    animation: none;
    transform: none;
}

.gaming-cw-app--last-minute::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(circle at 85% 8%, rgba(255, 87, 34, 0.22) 0%, transparent 55%);
    animation: gaming-cw-tension-bg 0.9s ease-in-out infinite;
}

.gaming-cw-app--last-minute .gaming-cw-stage {
    z-index: 2;
}

@keyframes gaming-cw-clock-heartbeat {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    }
    12% {
        transform: scale(1.14);
        box-shadow: 0 0 22px rgba(255, 87, 34, 0.65);
    }
    24% {
        transform: scale(1);
    }
    36% {
        transform: scale(1.08);
        box-shadow: 0 0 16px rgba(255, 138, 101, 0.5);
    }
}

@keyframes gaming-cw-tension-bg {
    0%, 100% { opacity: 0.15; }
    12%, 36% { opacity: 0.85; }
    24% { opacity: 0.25; }
}

@keyframes gaming-cw-countdown-pulse {
    50% { opacity: 0.72; }
}

/* Drawer — sopra griglia, HUD e barra definizioni quando aperto */
.gaming-cw-drawer {
    --gaming-cw-drawer-width: min(88vw, 280px);
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: var(--gaming-cw-drawer-width);
    background: var(--green-dark, #0c5505);
    color: var(--yellow-accent, #ffd700);
    transform: translateX(-100%);
    transition: transform 0.22s ease-in-out;
    z-index: 10200;
    box-shadow: 4px 0 18px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.gaming-cw-drawer.open {
    transform: translateX(0);
    pointer-events: auto;
}

.gaming-cw-drawer-scrim {
    position: fixed;
    inset: 0;
    z-index: 10190;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.52);
    cursor: pointer;
}

.gaming-cw-drawer-scrim[hidden] {
    display: none;
}

.gaming-cw-drawer-panel {
    position: relative;
    z-index: 1;
    height: 100%;
    overflow-y: auto;
    padding: 14px;
    -webkit-overflow-scrolling: touch;
}

.gaming-cw-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.gaming-cw-drawer-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--yellow-accent, #ffd700);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
}

.gaming-cw-size-picker {
    margin-bottom: 10px;
}

.gaming-cw-size-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
    margin-bottom: 6px;
}

.gaming-cw-size-btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.gaming-cw-size-btn {
    padding: 8px 4px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.15);
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.gaming-cw-size-btn--active {
    background: var(--yellow-accent, #ffd700);
    color: var(--green-dark, #0c5505);
    border-color: var(--yellow-accent, #ffd700);
}

.gaming-cw-drawer-session {
    margin: 0 0 10px;
    font-size: 0.72rem;
    line-height: 1.35;
    opacity: 0.88;
    color: rgba(255, 255, 255, 0.92);
}

.gaming-cw-new-setup-inner {
    max-width: 420px;
}

.gaming-cw-new-setup-intro {
    margin: 0 0 12px;
    font-size: 0.88rem;
    line-height: 1.4;
    opacity: 0.92;
}

.gaming-cw-new-setup-field {
    margin: 12px 0;
}

.gaming-cw-new-setup-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
    margin-bottom: 6px;
}

.gaming-cw-new-setup-select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.45);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-family: inherit;
    font-size: 0.88rem;
}

.gaming-cw-new-setup-desc {
    margin: 6px 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
    opacity: 0.85;
}

.gaming-cw-dict-meta {
    margin: 10px 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 215, 0, 0.25);
}

.gaming-cw-dict-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    margin-bottom: 6px;
}

.gaming-cw-dict-meta-row:last-child {
    margin-bottom: 0;
}

.gaming-cw-dict-meta dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.75;
}

.gaming-cw-dict-meta dd {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: right;
}

.gaming-cw-new-setup-note {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.35);
    font-size: 0.78rem;
    line-height: 1.35;
}

.gaming-cw-drawer-btn--accent {
    margin-bottom: 10px;
    background: rgba(255, 215, 0, 0.18);
    font-weight: 700;
}

.gaming-cw-drawer-title {
    margin: 0 0 4px;
    font-size: 1rem;
    line-height: 1.25;
}

.gaming-cw-drawer-sub {
    margin: 0 0 12px;
    font-size: 0.78rem;
    opacity: 0.9;
    line-height: 1.35;
}

.gaming-cw-drawer-back {
    margin: 0 0 10px;
    text-align: center;
}

.gaming-cw-drawer-account {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.35);
    background: rgba(0, 0, 0, 0.2);
}

.gaming-cw-drawer-account-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gaming-cw-drawer-account-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 215, 0, 0.45);
    font-size: 1.25rem;
}

.gaming-cw-drawer-account-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gaming-cw-drawer-account-avatar-img[hidden],
.gaming-cw-drawer-account-avatar-fallback[hidden] {
    display: none !important;
}

.gaming-cw-drawer-account-body {
    min-width: 0;
    flex: 1;
}

.gaming-cw-drawer-account-name {
    margin: 0 0 4px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    word-break: break-word;
}

.gaming-cw-drawer-account-points {
    margin: 0;
    font-size: 0.78rem;
    opacity: 0.92;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.gaming-cw-drawer-account-points strong {
    color: var(--yellow-accent, #ffd700);
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}

.gaming-cw-drawer-account-pt {
    opacity: 0.8;
}

.gaming-cw-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.gaming-cw-drawer-actions-row {
    display: flex;
    gap: 6px;
}

.gaming-cw-drawer-actions-row .gaming-cw-drawer-btn {
    flex: 1 1 0;
    min-width: 0;
}

.gaming-cw-drawer-util {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.gaming-cw-drawer-util-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
}

.gaming-cw-lang-select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.45);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.gaming-cw-drawer-share-trigger {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.45);
    background: rgba(255, 255, 255, 0.08);
    color: var(--yellow-accent, #ffd700);
    font-family: inherit;
    font-size: 0.82rem;
    text-align: left;
    cursor: pointer;
}

.gaming-cw-drawer-share-panel {
    margin-top: 8px;
    padding: 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.25);
}

.gaming-cw-drawer-share-panel[hidden] {
    display: none;
}

.gaming-cw-drawer-share-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.gaming-cw-share-btn {
    display: block;
    padding: 7px 8px;
    border-radius: 5px;
    border: none;
    font-size: 0.72rem;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.gaming-cw-share-btn--wa { background: #25d366; color: #0a2e14; }
.gaming-cw-share-btn--fb { background: #1877f2; }
.gaming-cw-share-btn--tg { background: #0088cc; }
.gaming-cw-share-btn--tw { background: #111; }
.gaming-cw-share-btn--li { background: #0a66c2; }
.gaming-cw-share-btn--copy {
    grid-column: 1 / -1;
    background: rgba(255, 215, 0, 0.2);
    color: var(--yellow-accent, #ffd700);
}

.gaming-cw-drawer-share-status {
    margin: 6px 0 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #a5d6a7;
}

.gaming-cw-cluebar-fact {
    margin: 0 0 8px;
    padding: 6px 8px;
    font-size: 0.76rem;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border-left: 3px solid var(--yellow-accent, #ffd700);
}

.gaming-cw-cluebar-fact::before {
    content: 'Lo sapevi? ';
    font-weight: 700;
    color: var(--yellow-accent, #ffd700);
}

html[lang="en"] .gaming-cw-cluebar-fact::before {
    content: 'Did you know? ';
}

.gaming-cw-drawer-link,
.gaming-cw-drawer-btn {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    text-align: left;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
}

.gaming-cw-drawer-link {
    color: var(--yellow-accent, #ffd700);
    background: rgba(255, 255, 255, 0.08);
}

.gaming-cw-drawer-btn {
    border: 1px solid rgba(255, 215, 0, 0.45);
    background: rgba(0, 0, 0, 0.15);
    color: #fff;
}

.gaming-cw-drawer-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gaming-cw-fs-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.gaming-cw-fs-btn-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.gaming-cw-fs-btn--on {
    border-color: var(--yellow-accent, #ffd700);
    color: var(--yellow-accent, #ffd700);
}

.gaming-cw-drawer-clues h3 {
    margin: 10px 0 6px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
}

.gaming-cw-clues-list {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
    font-size: 0.78rem;
    line-height: 1.4;
}

.gaming-cw-clue-num {
    font-weight: 700;
    color: var(--yellow-accent, #ffd700);
}

.gaming-cw-clue {
    margin-bottom: 5px;
    cursor: pointer;
    padding: 4px 5px;
    border-radius: 4px;
}

.gaming-cw-clue--active {
    background: rgba(255, 215, 0, 0.22);
    font-weight: 600;
}

.gaming-cw-clue--solved {
    opacity: 0.55;
    text-decoration: line-through;
}

/* Stage — campo di gioco */
.gaming-cw-stage {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
    padding-bottom: var(--gaming-cw-cluebar-reserve, 128px);
    background:
        radial-gradient(ellipse at center, rgba(255, 255, 255, 0.04) 0%, transparent 70%),
        #243a1c;
}

.gaming-cw-app--grid-overlay {
    overflow: visible;
}

.gaming-cw-stage--pan-ready {
    cursor: grab;
}

.gaming-cw-stage--overlay-cluebar,
.gaming-cw-stage--zoomed,
.gaming-cw-stage--panned {
    overflow: visible;
}

.gaming-cw-stage--pan-ready.gaming-cw-stage--panning,
.gaming-cw-stage--zoomed.gaming-cw-stage--panning,
.gaming-cw-stage--kb-pan.gaming-cw-stage--panning {
    cursor: grabbing;
}

.gaming-cw-stage--zoomed {
    cursor: grab;
}

.gaming-cw-stage--kb-pan {
    cursor: grab;
}

.gaming-cw-stage--panning,
.gaming-cw-stage--zoomed.gaming-cw-stage--panning,
.gaming-cw-stage--kb-pan.gaming-cw-stage--panning {
    cursor: grabbing;
}

.gaming-cw-stage-inner--dragging {
    transition: none;
}

.gaming-cw-stage-inner {
    position: relative;
    z-index: 1;
    transform-origin: center center;
    transition: transform 0.05s linear;
    padding: 12px;
    will-change: transform;
}

.gaming-cw-zoom-hint {
    position: absolute;
    bottom: calc(140px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    white-space: nowrap;
    max-width: 92vw;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.gaming-cw-app--kb-open .gaming-cw-zoom-hint {
    color: rgba(255, 215, 0, 0.72);
}

.gaming-cw-zoom-hint-kb {
    display: none;
}

.gaming-cw-app--kb-open .gaming-cw-zoom-hint-default {
    display: none;
}

.gaming-cw-app--kb-open .gaming-cw-zoom-hint-kb {
    display: inline;
}

.gaming-cw-grid {
    display: grid;
    gap: 2px;
    width: min(94vw, 420px);
    margin: 0 auto;
    touch-action: manipulation;
    background: #0a0a0a;
    padding: 3px;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.gaming-cw-grid--medium {
    width: min(96vw, 380px);
}

.gaming-cw-grid--medium .gaming-cw-cell-num {
    font-size: 0.42rem;
}

.gaming-cw-grid--medium .gaming-cw-cell-letter {
    font-size: clamp(0.55rem, 2.6vw, 0.85rem);
}

.gaming-cw-grid--large {
    width: min(98vw, 360px);
}

.gaming-cw-grid--large .gaming-cw-cell-num {
    font-size: 0.38rem;
}

.gaming-cw-grid--large .gaming-cw-cell-letter {
    font-size: clamp(0.45rem, 2vw, 0.72rem);
}

.gaming-cw-cell {
    position: relative;
    aspect-ratio: 1;
    min-width: 0;
}

.gaming-cw-cell--block {
    background: #0a0a0a;
    pointer-events: none;
}

.gaming-cw-cell--input {
    background: #fff;
    border: 1px solid rgba(12, 85, 5, 0.25);
    border-radius: 2px;
    cursor: pointer;
}

.gaming-cw-cell--input.gaming-cw-cell--in-word {
    background: #fff;
    border-color: var(--yellow-accent, #ffd700);
    box-shadow: inset 0 0 0 1.5px rgba(255, 215, 0, 0.85);
}

.gaming-cw-cell--input.gaming-cw-cell--active {
    background: #fff;
    border-color: var(--yellow-accent, #ffd700);
    box-shadow: inset 0 0 0 2.5px rgba(255, 180, 0, 0.95);
    z-index: 1;
}

.gaming-cw-cell--input.gaming-cw-cell--locked {
    background: #fff;
    cursor: default;
}

.gaming-cw-cell--input.gaming-cw-cell--locked.gaming-cw-cell--in-word,
.gaming-cw-cell--input.gaming-cw-cell--locked.gaming-cw-cell--active {
    background: #fff;
    border-color: var(--yellow-accent, #ffd700);
}

.gaming-cw-cell-num {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 1.35rem;
    min-height: 1.1rem;
    padding: 2px 4px 0 2px;
    font-size: 0.5rem;
    line-height: 1;
    font-weight: 700;
    color: var(--green-dark, #0c5505);
    pointer-events: auto;
    cursor: pointer;
    z-index: 3;
    -webkit-tap-highlight-color: transparent;
}

.gaming-cw-cell-num:active {
    color: var(--yellow-accent, #ffd700);
}

.gaming-cw-cell-letter {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-family: inherit;
    font-size: clamp(0.75rem, 3.8vw, 1.05rem);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--green-dark, #0c5505);
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gaming-cw-cell-letter:focus {
    outline: none;
}

.gaming-cw-cell-letter--locked {
    color: #1b5e20;
    pointer-events: none;
}

.gaming-cw-cell-letter--correct {
    color: #2e7d32;
}

.gaming-cw-cell-letter--wrong {
    color: #b71c1c;
}

/* Parola indovinata: onda verde evidente sulle caselle */
@keyframes gaming-cw-word-solve {
    0% {
        transform: scale(1);
        background-color: #fff;
        box-shadow: inset 0 0 0 2px transparent, 0 0 0 0 rgba(255, 215, 0, 0);
    }
    35% {
        transform: scale(1.18);
        background-color: #81c784;
        box-shadow: inset 0 0 0 2px #1b5e20, 0 0 0 3px rgba(255, 215, 0, 0.95);
    }
    70% {
        transform: scale(1.05);
        background-color: #c8e6c9;
        box-shadow: inset 0 0 0 2px #43a047, 0 0 0 2px rgba(255, 215, 0, 0.55);
    }
    100% {
        transform: scale(1);
        background-color: #e8f5e9;
        box-shadow: inset 0 0 0 2px #66bb6a, 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

.gaming-cw-cell--input.gaming-cw-cell--just-solved,
.gaming-cw-cell--input.gaming-cw-cell--locked.gaming-cw-cell--just-solved,
.gaming-cw-cell--input.gaming-cw-cell--in-word.gaming-cw-cell--just-solved,
.gaming-cw-cell--input.gaming-cw-cell--active.gaming-cw-cell--just-solved {
    animation: gaming-cw-word-solve 0.9s ease-out both;
    animation-delay: var(--gaming-cw-solve-delay, 0ms);
    z-index: 4;
}

.gaming-cw-cell--just-solved .gaming-cw-cell-letter {
    color: #0c5505 !important;
    font-weight: 800;
}

/* Schema pieno con errori: lampeggio sulla CASELLA (affidabile su mobile) */
@keyframes gaming-cw-cell-wrong-pulse {
    0%,
    100% {
        background-color: #ffebee;
        box-shadow: inset 0 0 0 2px #c62828;
    }
    50% {
        background-color: #e53935;
        box-shadow: inset 0 0 0 2px #b71c1c, 0 0 0 2px rgba(255, 215, 0, 0.65);
    }
}

.gaming-cw-grid--full-errors .gaming-cw-cell--wrong {
    animation: gaming-cw-cell-wrong-pulse 0.8s ease-in-out infinite;
    z-index: 3;
}

.gaming-cw-grid--full-errors .gaming-cw-cell--wrong .gaming-cw-cell-letter,
.gaming-cw-grid--full-errors .gaming-cw-cell-letter--wrong {
    color: #fff !important;
    animation: none;
}

@keyframes gaming-cw-wrong-blink-slot {
    0%,
    100% {
        color: #b71c1c;
        background-color: #fff;
        border-color: rgba(183, 28, 28, 0.55);
    }
    50% {
        color: #fff;
        background-color: #c62828;
        border-color: #c62828;
    }
}

.gaming-cw-cluebar--full-errors .gaming-cw-word-slot-letter--wrong,
.gaming-cw-word-slots--full-errors .gaming-cw-word-slot-letter--wrong,
.gaming-cw-cluebar--full-errors .gaming-cw-word-slot--wrong {
    animation: gaming-cw-wrong-blink-slot 0.8s ease-in-out infinite;
}

.gaming-cw-word-slot--just-solved {
    animation: gaming-cw-word-solve 0.9s ease-out both;
    animation-delay: var(--gaming-cw-solve-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
    .gaming-cw-cell--just-solved,
    .gaming-cw-word-slot--just-solved {
        animation: none !important;
        background-color: #81c784 !important;
        box-shadow: inset 0 0 0 2px #1b5e20 !important;
    }

    .gaming-cw-grid--full-errors .gaming-cw-cell--wrong,
    .gaming-cw-cluebar--full-errors .gaming-cw-word-slot-letter--wrong,
    .gaming-cw-word-slots--full-errors .gaming-cw-word-slot-letter--wrong,
    .gaming-cw-cluebar--full-errors .gaming-cw-word-slot--wrong {
        animation: none !important;
        background-color: #e53935 !important;
        outline: 2px solid #ffd700;
        outline-offset: -2px;
    }
}

/* Barra definizione + input parola — fixed, si alza con la tastiera mobile */
.gaming-cw-help-nudge {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(var(--gaming-cw-kb-inset, 0px) + var(--gaming-cw-cluebar-reserve, 128px) + 10px);
    z-index: 10060;
    pointer-events: none;
}

.gaming-cw-help-nudge[hidden] {
    display: none !important;
}

.gaming-cw-help-nudge-panel {
    pointer-events: auto;
    position: relative;
    margin: 0 auto;
    max-width: 420px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid var(--yellow-accent, #ffd700);
    background: rgba(12, 85, 5, 0.97);
    color: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
    animation: gaming-cw-help-nudge-in 0.28s ease-out;
}

@keyframes gaming-cw-help-nudge-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gaming-cw-help-nudge-panel[hidden] {
    display: none !important;
}

.gaming-cw-help-nudge-text {
    margin: 0 0 10px;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--yellow-accent, #ffd700);
    text-align: center;
}

.gaming-cw-help-nudge-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.gaming-cw-help-nudge-actions--stack {
    flex-direction: column;
}

.gaming-cw-help-nudge-btn {
    flex: 1 1 auto;
    min-width: 88px;
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.22);
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
}

.gaming-cw-help-nudge-btn--yes,
.gaming-cw-help-nudge-btn--accent {
    background: var(--yellow-accent, #ffd700);
    color: var(--green-dark, #0c5505);
    border-color: #ffb300;
}

.gaming-cw-help-nudge-btn--suggest {
    display: block;
    width: 100%;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 215, 0, 0.75);
    color: var(--yellow-accent, #ffd700);
}

.gaming-cw-help-nudge-btn--suggest[hidden] {
    display: none !important;
}

@keyframes gaming-cw-word-suggest {
    0%,
    100% {
        background-color: #fff;
        box-shadow: inset 0 0 0 2px rgba(255, 215, 0, 0.35);
        transform: scale(1);
    }
    50% {
        background-color: #fff8e1;
        box-shadow: inset 0 0 0 2px #ffb300, 0 0 0 3px rgba(255, 215, 0, 0.55);
        transform: scale(1.06);
    }
}

.gaming-cw-cell--input.gaming-cw-cell--suggest {
    animation: gaming-cw-word-suggest 0.85s ease-in-out infinite;
    animation-delay: var(--gaming-cw-suggest-delay, 0ms);
    z-index: 5;
}

.gaming-cw-clue--suggest {
    outline: 2px solid var(--yellow-accent, #ffd700);
    outline-offset: 1px;
    background: rgba(255, 215, 0, 0.18) !important;
}

.gaming-cw-help-nudge-close {
    position: absolute;
    top: 6px;
    right: 8px;
    border: none;
    background: transparent;
    color: var(--yellow-accent, #ffd700);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
}

.gaming-cw-cluebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--gaming-cw-kb-inset, 0px);
    flex-shrink: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(12, 85, 5, 0.96);
    color: #fff;
    border-top: 2px solid var(--yellow-accent, #ffd700);
    min-width: 0;
    z-index: 10050;
    transition: bottom 0.12s ease-out;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
}

.gaming-cw-cluebar-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.gaming-cw-cluebar-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--yellow-accent, #ffd700);
    text-align: left;
}

.gaming-cw-dir-toggle {
    border: 1px solid rgba(255, 215, 0, 0.5);
    background: rgba(0, 0, 0, 0.2);
    color: var(--yellow-accent, #ffd700);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
}

/* Bottone segnalazione errore definizione (testo, non solo emoji) */
.gaming-cw-report-btn {
    margin-left: auto;
    border: 1px solid rgba(255, 215, 0, 0.55);
    background: rgba(0, 0, 0, 0.25);
    color: var(--yellow-accent, #ffd700);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1.2;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    flex-shrink: 0;
    font-family: inherit;
    white-space: nowrap;
}
.gaming-cw-report-btn:hover,
.gaming-cw-report-btn:focus-visible {
    color: #fff;
    background: rgba(255, 138, 101, 0.35);
    border-color: #ff8a65;
    outline: none;
}
.gaming-cw-report-btn--sent {
    color: #c8e6c9 !important;
    background: rgba(129, 199, 132, 0.28) !important;
    border-color: #81c784 !important;
}

/* Status feedback inline cluebar */
.gaming-cw-status--ok {
    color: #a5d6a7;
}
.gaming-cw-status--err {
    color: #ef9a9a;
}

.gaming-cw-cluebar-text {
    margin: 0 0 6px;
    font-size: 0.84rem;
    line-height: 1.4;
    text-align: left;
}

.gaming-cw-word-row {
    --gaming-cw-slot-size: clamp(1.55rem, 7.2vw, 2.1rem);
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.gaming-cw-word-entry {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.gaming-cw-word-slots-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 215, 0, 0.45) transparent;
}

.gaming-cw-word-slots-scroll--dragging {
    cursor: grabbing;
}

.gaming-cw-word-slots-scroll--dragging .gaming-cw-word-slot-letter {
    user-select: none;
    -webkit-user-select: none;
}

.gaming-cw-word-slots-scroll::-webkit-scrollbar {
    height: 4px;
}

.gaming-cw-word-slots-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.45);
    border-radius: 999px;
}

.gaming-cw-word-slots {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    align-items: stretch;
    justify-content: flex-start;
}

.gaming-cw-word-slot {
    position: relative;
    flex: 0 0 auto;
    width: var(--gaming-cw-slot-size);
    height: var(--gaming-cw-slot-size);
    aspect-ratio: 1;
    background: #fff;
    border: 1px solid rgba(12, 85, 5, 0.25);
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.gaming-cw-word-slot--correct {
    border-color: rgba(46, 125, 50, 0.55);
}

.gaming-cw-word-slot--wrong {
    border-color: rgba(183, 28, 28, 0.45);
}

.gaming-cw-word-slot--lens {
    box-shadow:
        inset 0 0 0 2.5px rgba(255, 215, 0, 1),
        0 0 0 2px rgba(255, 215, 0, 0.45);
    z-index: 2;
}

.gaming-cw-word-lens[hidden] {
    display: none !important;
}

.gaming-cw-word-lens {
    position: absolute;
    width: 88px;
    height: 88px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

.gaming-cw-word-lens-ring {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--yellow-accent, #ffd700);
    background: rgba(255, 255, 255, 0.98);
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px rgba(12, 85, 5, 0.2),
        0 0 0 4px rgba(12, 85, 5, 0.35);
}

.gaming-cw-word-lens-viewport {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gaming-cw-word-lens-label {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.48rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--green-dark, #0c5505);
    background: var(--yellow-accent, #ffd700);
    padding: 1px 6px 2px;
    border-radius: 999px;
    line-height: 1.2;
}

.gaming-cw-word-lens-cell {
    position: relative;
    width: 52px;
    height: 52px;
    background: #fff;
    border: 2px solid rgba(12, 85, 5, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(1.35);
}

.gaming-cw-word-lens-cell--in-word {
    background: rgba(200, 230, 201, 0.95);
}

.gaming-cw-word-lens-cell--active {
    border-color: rgba(255, 180, 0, 0.95);
    box-shadow: inset 0 0 0 2px rgba(255, 180, 0, 0.55);
}

.gaming-cw-word-lens-num {
    position: absolute;
    top: 2px;
    left: 3px;
    font-size: 0.52rem;
    font-weight: 700;
    color: rgba(12, 85, 5, 0.75);
    line-height: 1;
}

.gaming-cw-word-lens-letter {
    font-size: 1.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--green-dark, #0c5505);
    line-height: 1;
}

.gaming-cw-app--word-lens .gaming-cw-word-slots-scroll {
    touch-action: none;
}

.gaming-cw-word-slot--active {
    border-color: var(--yellow-accent, #ffd700);
    box-shadow: inset 0 0 0 2.5px rgba(255, 180, 0, 0.95);
}

.gaming-cw-word-slot--locked {
    background: #fff;
}

.gaming-cw-word-slot-letter {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-family: inherit;
    font-size: clamp(0.72rem, 3.4vw, 0.98rem);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--green-dark, #0c5505);
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1px;
}

.gaming-cw-word-slot-letter:focus {
    outline: none;
}

.gaming-cw-word-slot-letter--locked {
    color: #1b5e20;
    pointer-events: none;
}

.gaming-cw-word-slot-letter--correct {
    color: #2e7d32;
}

.gaming-cw-word-slot-letter--wrong {
    color: #b71c1c;
}

.gaming-cw-word-input--hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.gaming-cw-word-len {
    margin: 0;
    padding: 0 1px;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(255, 215, 0, 0.8);
    letter-spacing: 0.01em;
}

.gaming-cw-word-len[hidden] {
    display: none !important;
}

.gaming-cw-word-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #fff;
    color: var(--green-dark, #0c5505);
}

.gaming-cw-word-input:disabled {
    opacity: 0.7;
    background: #e8f5e9;
}

.gaming-cw-word-submit {
    flex-shrink: 0;
    align-self: flex-start;
    height: var(--gaming-cw-slot-size, clamp(1.55rem, 7.2vw, 2.1rem));
    min-width: var(--gaming-cw-slot-size, clamp(1.55rem, 7.2vw, 2.1rem));
    padding: 0 14px;
    border: none;
    border-radius: 8px;
    background: var(--yellow-accent, #ffd700);
    color: var(--green-dark, #0c5505);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gaming-cw-word-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.gaming-cw-status {
    margin: 6px 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: left;
}

.gaming-cw-status--ok {
    color: #a5d6a7;
}

.gaming-cw-status--warn {
    color: #ffcc80;
}

@media (min-width: 600px) {
    .gaming-cw-grid {
        width: min(440px, 50vw);
    }

    .gaming-cw-zoom-hint {
        display: none;
    }
}

/* Vittoria — sgretolamento griglia + contatore punti */
.gaming-cw-app--victory .gaming-cw-menu-fab,
.gaming-cw-app--victory .gaming-cw-zoom-hint {
    opacity: 0;
    pointer-events: none;
}

.gaming-cw-app--completing .gaming-cw-grid,
.gaming-cw-app--completing .gaming-cw-stage,
.gaming-cw-app--completing .gaming-cw-cluebar {
    pointer-events: none;
}

.gaming-cw-cluebar--disabled {
    opacity: 0.35;
    pointer-events: none;
}

.gaming-cw-stage-inner--shake {
    animation: gaming-cw-grid-shake 0.35s ease-in-out;
}

@keyframes gaming-cw-grid-shake {
    0%, 100% { transform: scale(1) translate(0, 0); }
    20% { transform: scale(1.02) translate(-3px, 2px); }
    40% { transform: scale(1.02) translate(4px, -2px); }
    60% { transform: scale(1.01) translate(-2px, -3px); }
    80% { transform: scale(1.01) translate(3px, 2px); }
}

.gaming-cw-grid--crumbling {
    overflow: visible !important;
    pointer-events: none;
}

.gaming-cw-cell--crumble {
    z-index: 10;
    animation: gaming-cw-cell-fall 1.15s cubic-bezier(0.45, 0.05, 0.55, 0.95) var(--cw-fall-delay, 0ms) forwards;
    will-change: transform, opacity;
}

@keyframes gaming-cw-cell-fall {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    12% {
        transform: translate(calc(var(--cw-fall-drift, 0px) * 0.15), -10px) rotate(calc(var(--cw-fall-rot, 0deg) * 0.15)) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translate(var(--cw-fall-drift, 0px), var(--cw-fall-dist, 100vh)) rotate(var(--cw-fall-rot, 0deg)) scale(0.85);
        opacity: 0;
    }
}

.gaming-cw-reveal-confirm-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gaming-cw-reveal-confirm-actions .gaming-cw-drawer-btn {
    flex: 1 1 120px;
}

.gaming-cw-buy-points {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
}

.gaming-cw-buy-points[hidden] {
    display: none !important;
}

.gaming-cw-buy-points-inner {
    position: relative;
    width: min(100%, 360px);
    padding: 20px 18px 16px;
    border-radius: 14px;
    background: linear-gradient(165deg, #0c5505 0%, #1a2e14 100%);
    border: 2px solid var(--yellow-accent, #ffd700);
    color: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.gaming-cw-buy-points-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    color: var(--yellow-accent, #ffd700);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.gaming-cw-buy-points-title {
    margin: 0 28px 10px 0;
    font-size: 1.15rem;
    color: var(--yellow-accent, #ffd700);
}

.gaming-cw-buy-points-msg,
.gaming-cw-buy-points-balance,
.gaming-cw-buy-points-offer {
    margin: 0 0 8px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.gaming-cw-buy-points-offer {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 12px;
}

.gaming-cw-paypal-buttons {
    min-height: 48px;
}

.gaming-cw-buy-points-status {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: var(--yellow-accent, #ffd700);
}

.gaming-cw-vowel-pick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.gaming-cw-vowel-pick-btn {
    min-width: 52px;
    min-height: 52px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 2px solid rgba(255, 215, 0, 0.65);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 700;
    cursor: pointer;
}

.gaming-cw-vowel-pick-btn:active {
    transform: scale(0.96);
    background: rgba(255, 215, 0, 0.22);
}

.gaming-cw-pause {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: radial-gradient(ellipse at center, rgba(12, 85, 5, 0.55) 0%, rgba(0, 0, 0, 0.82) 70%);
    backdrop-filter: blur(2px);
}

.gaming-cw-pause[hidden] {
    display: none !important;
}

.gaming-cw-pause-inner {
    text-align: center;
    max-width: 320px;
    width: 100%;
    color: #fff;
}

.gaming-cw-pause-title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--yellow-accent, #ffd700);
}

.gaming-cw-pause-desc {
    margin: 0 0 18px;
    font-size: 0.92rem;
    line-height: 1.45;
    opacity: 0.92;
}

.gaming-cw-pause-time-label {
    margin: 0 0 4px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.75;
}

.gaming-cw-pause-time {
    margin: 0 0 22px;
    font-size: 2.4rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #fff;
    letter-spacing: 0.04em;
}

.gaming-cw-pause-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 160px;
    padding: 14px 28px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffd700 0%, #e6b800 100%);
    color: #1a2e14;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.gaming-cw-pause-play:active {
    transform: scale(0.97);
}

.gaming-cw-pause-play-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.gaming-cw-app--paused .gaming-cw-stage,
.gaming-cw-app--paused .gaming-cw-cluebar,
.gaming-cw-app--paused .gaming-cw-hud-tr,
.gaming-cw-app--paused .gaming-cw-menu-fab {
    pointer-events: none;
}

.gaming-cw-victory {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(ellipse at center, rgba(12, 85, 5, 0.55) 0%, rgba(0, 0, 0, 0.72) 70%);
    pointer-events: auto;
    animation: gaming-cw-victory-fade 0.5s ease-out;
}

@keyframes gaming-cw-victory-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gaming-cw-victory-inner {
    text-align: center;
    color: #fff;
}

.gaming-cw-victory-title {
    margin: 0 0 12px;
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: var(--yellow-accent, #ffd700);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.gaming-cw-victory-points-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}

.gaming-cw-victory-points-wrap--rolling .gaming-cw-victory-points {
    animation: none;
}

.gaming-cw-victory-points {
    font-size: clamp(3rem, 18vw, 5rem);
    font-weight: 700;
    line-height: 1;
    color: var(--yellow-accent, #ffd700);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 4px 24px rgba(255, 215, 0, 0.45);
    animation: gaming-cw-points-pop 0.4s ease-out;
    display: inline-block;
    transform-origin: center bottom;
}

.gaming-cw-victory-points--tick {
    animation: gaming-cw-points-tick 0.16s ease-out;
}

@keyframes gaming-cw-points-pop {
    0% { transform: scale(0.6); opacity: 0; }
    70% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes gaming-cw-points-tick {
    0% { transform: scale(1); }
    40% { transform: scale(1.14); text-shadow: 0 0 28px rgba(255, 215, 0, 0.85); }
    100% { transform: scale(1); }
}

.gaming-cw-victory-points-label {
    font-size: 1.35rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
}

.gaming-cw-victory-sub {
    margin: 0;
    font-size: 0.92rem;
    opacity: 0.9;
    line-height: 1.4;
    min-height: 1.4em;
}

.gaming-cw-victory-trophy {
    margin: 8px 0 14px;
    opacity: 0;
    transform: scale(0.4) translateY(12px);
    pointer-events: none;
}

.gaming-cw-victory-trophy--show {
    animation: gaming-cw-trophy-pop 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.gaming-cw-victory-trophy--hide {
    animation: gaming-cw-trophy-out 0.48s ease-in forwards;
}

@keyframes gaming-cw-trophy-pop {
    0% { opacity: 0; transform: scale(0.35) translateY(24px) rotate(-8deg); }
    45% { opacity: 1; transform: scale(1.12) translateY(-6px) rotate(4deg); }
    70% { transform: scale(0.96) translateY(0) rotate(-2deg); }
    100% { opacity: 1; transform: scale(1) translateY(0) rotate(0deg); }
}

@keyframes gaming-cw-trophy-out {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.5) translateY(-16px); }
}

.gaming-cw-victory-trophy-icon {
    display: block;
    font-size: clamp(2.8rem, 16vw, 4.2rem);
    line-height: 1;
    filter: drop-shadow(0 6px 18px rgba(255, 215, 0, 0.55));
}

.gaming-cw-victory-trophy-text {
    margin: 8px 0 0;
    font-size: clamp(1rem, 4.5vw, 1.2rem);
    font-weight: 800;
    color: var(--yellow-accent, #ffd700);
    letter-spacing: 0.03em;
}

.gaming-cw-victory-next {
    margin-top: 18px;
}

.gaming-cw-victory-next-text {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.92);
}

.gaming-cw-victory-next-text strong {
    color: var(--yellow-accent, #ffd700);
    font-size: 1.15rem;
}

.gaming-cw-victory-next-btn {
    padding: 12px 22px;
    border: 2px solid var(--yellow-accent, #ffd700);
    border-radius: 10px;
    background: var(--yellow-accent, #ffd700);
    color: var(--green-dark, #0c5505);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.gaming-cw-victory-next-btn:active {
    transform: scale(0.98);
}

/* —— Piove frutta dal cielo —— */
body.gaming-fr-play {
    margin: 0;
    min-height: 100dvh;
    background: #1b5e20;
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: none;
}

body.gaming-fr-play--immersive {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}

html:fullscreen body.gaming-fr-play,
html:-webkit-full-screen body.gaming-fr-play {
    background: #1b5e20;
}

body.gaming-fr-play--native-fs .gaming-fr-app {
    inset: 0;
}

/* Shell gioco condiviso — schermo intero (cruciverba + piove frutta) */
.gaming-play-fs-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    text-align: left;
}

.gaming-play-fs-btn-icon {
    font-size: 1.15rem;
    line-height: 1;
    flex: 0 0 auto;
}

.gaming-play-fs-btn--on {
    border-color: var(--yellow-accent, #ffd700) !important;
    color: var(--yellow-accent, #ffd700) !important;
}

.gaming-fr-drawer-btn {
    margin-bottom: 10px;
}

.gaming-fr-gate,
.gaming-fr-app {
    min-height: 100dvh;
}

.gaming-fr-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(180deg, #87ceeb 0%, #a5d6a7 55%, #6d4c2a 100%);
}

.gaming-fr-gate-inner {
    max-width: 420px;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--green-dark, #0c5505);
    border-radius: 12px;
    padding: 24px 20px;
}

.gaming-fr-app {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    --fr-bg-image: none;
    background:
        linear-gradient(rgba(12, 85, 5, 0.42), rgba(12, 85, 5, 0.52)),
        var(--fr-bg-image) center / cover no-repeat fixed;
}

.gaming-fr-menu-fab {
    position: fixed;
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: calc(8px + env(safe-area-inset-left, 0px));
    z-index: 10060;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 215, 0, 0.55);
    border-radius: 10px;
    background: rgba(12, 85, 5, 0.92);
    color: var(--yellow-accent, #ffd700);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.gaming-fr-menu-fab[aria-expanded="true"] {
    opacity: 0;
    pointer-events: none;
}

.gaming-fr-squad-bar {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    left: 58px;
    right: max(10px, env(safe-area-inset-right));
    z-index: 10056;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    pointer-events: none;
}

.gaming-fr-voice-controls {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
    flex: 0 0 auto;
}

.gaming-fr-voice-vol {
    position: fixed;
    top: 56px;
    left: 12px;
    z-index: 10090;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid var(--green-dark, #0c5505);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

.gaming-fr-voice-vol-title {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--green-dark, #0c5505);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gaming-fr-voice-vol[hidden] {
    display: none !important;
}

.gaming-fr-voice-vol-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--green-dark, #0c5505);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gaming-fr-voice-vol input[type="range"] {
    width: 100%;
    margin: 0;
    accent-color: #2e7d32;
}

.gaming-fr-voice-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gaming-fr-voice-btn--on {
    background: rgba(46, 125, 50, 0.92);
    border-color: #a5d6a7;
}

.gaming-fr-voice-btn--linked {
    box-shadow: 0 0 0 2px #81c784, 0 2px 8px rgba(0, 0, 0, 0.25);
}

.gaming-fr-voice-btn--busy {
    animation: gaming-fr-voice-pulse 0.9s ease-in-out infinite;
}

@keyframes gaming-fr-voice-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.62; }
}

.gaming-fr-voice-btn:not(.gaming-fr-voice-btn--on) {
    background: rgba(84, 84, 84, 0.88);
    opacity: 0.92;
}

.gaming-fr-voice-btn:focus-visible {
    outline: 2px solid #ffeb3b;
    outline-offset: 2px;
}

.gaming-fr-squad-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    flex: 0 0 auto;
}

.gaming-fr-squad-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    flex: 1 1 auto;
    pointer-events: none;
}

.gaming-fr-player-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px 6px 3px;
    background: rgba(255, 255, 255, 0.94);
    border: 2px solid var(--green-dark, #0c5505);
    border-radius: 999px;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    --voice-level: 0;
}

.gaming-fr-player-chip--you {
    border-color: #f9a825;
    box-shadow: 0 0 0 1px #ffeb3b;
}

.gaming-fr-player-chip--speaking {
    border-color: #2e7d32;
    background: rgba(232, 245, 233, 0.98);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.55), 0 0 10px rgba(76, 175, 80, 0.35);
}

.gaming-fr-voice-meter {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;
    height: 3px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.12);
    overflow: hidden;
    pointer-events: none;
}

.gaming-fr-voice-meter-fill {
    display: block;
    height: 100%;
    width: calc(var(--voice-level, 0) * 1%);
    max-width: 100%;
    background: linear-gradient(90deg, #66bb6a, #2e7d32);
    transition: width 0.08s linear;
}

.gaming-fr-player-item--speaking {
    outline: 2px solid rgba(76, 175, 80, 0.65);
    outline-offset: 1px;
    background: rgba(232, 245, 233, 0.55);
}

.gaming-fr-player-item .gaming-fr-voice-meter {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 2px;
    height: 3px;
}

.gaming-fr-voice-btn--speaking {
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.75), 0 0 8px rgba(76, 175, 80, 0.45);
}

.gaming-fr-voice-btn--incoming {
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.75), 0 0 10px rgba(33, 150, 243, 0.4);
    animation: gaming-fr-voice-incoming-pulse 0.9s ease-in-out infinite;
}

@keyframes gaming-fr-voice-incoming-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.12); }
}

.gaming-fr-player-chip--host .gaming-fr-player-avatar {
    box-shadow: 0 0 0 2px #ff9800;
}

.gaming-fr-player-avatar {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f5e9;
    font-size: 1rem;
    line-height: 1;
}

.gaming-fr-player-avatar--list {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
}

.gaming-fr-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gaming-fr-player-chip-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--green-dark, #0c5505);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 88px;
}

.gaming-fr-app.gaming-fr-has-squad .gaming-fr-hud {
    top: max(38px, calc(env(safe-area-inset-top) + 30px));
}

@media (max-width: 639px) {
    .gaming-fr-app.gaming-fr-has-squad .gaming-fr-hud {
        top: max(34px, calc(env(safe-area-inset-top) + 26px));
    }

    .gaming-fr-squad-bar {
        left: 52px;
        right: 8px;
        top: max(6px, env(safe-area-inset-top));
        gap: 4px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .gaming-fr-squad-bar::-webkit-scrollbar {
        display: none;
    }

    .gaming-fr-squad-label {
        display: none;
    }

    .gaming-fr-voice-controls {
        gap: 4px;
        order: -1;
    }

    .gaming-fr-voice-btn {
        width: 28px;
        height: 28px;
        font-size: 0.82rem;
    }

    .gaming-fr-squad-row {
        flex-wrap: nowrap;
        gap: 4px;
        min-width: 0;
    }

    .gaming-fr-player-chip {
        padding: 1px 5px 1px 1px;
        gap: 4px;
        flex: 0 0 auto;
    }

    .gaming-fr-player-avatar {
        width: 22px;
        height: 22px;
        font-size: 0.78rem;
    }

    .gaming-fr-player-chip-name {
        font-size: 0.64rem;
        max-width: 48px;
    }
}

.gaming-fr-local-pause {
    position: fixed;
    inset: 0;
    z-index: 10080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: radial-gradient(ellipse at center, rgba(12, 85, 5, 0.55) 0%, rgba(0, 0, 0, 0.82) 70%);
    backdrop-filter: blur(2px);
}

.gaming-fr-local-pause[hidden] {
    display: none !important;
}

.gaming-fr-local-pause-inner {
    text-align: center;
    max-width: 320px;
    width: 100%;
    color: #fff;
}

.gaming-fr-local-pause-title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 700;
}

.gaming-fr-local-pause-desc {
    margin: 0 0 20px;
    font-size: 0.92rem;
    line-height: 1.45;
    opacity: 0.92;
}

.gaming-fr-local-pause-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
    min-height: 52px;
    padding: 10px 22px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffd54f 0%, #ffb300 100%);
    color: #3e2723;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.gaming-fr-local-pause-play:active {
    transform: scale(0.96);
}

.gaming-fr-local-pause-play-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.gaming-fr-basket-colors {
    position: fixed;
    left: 50%;
    bottom: max(14px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 10240;
    width: min(96vw, 420px);
    padding: 14px 16px 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid var(--green-dark, #0c5505);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    text-align: center;
}

.gaming-fr-basket-colors--urgent {
    bottom: max(18%, env(safe-area-inset-bottom));
    border-color: #ef6c00;
    box-shadow: 0 8px 28px rgba(239, 108, 0, 0.35);
}

.gaming-fr-basket-colors--waiting {
    border-color: #1565c0;
}

.gaming-fr-basket-colors-label {
    margin: 0 0 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--green-dark, #0c5505);
    line-height: 1.35;
}

.gaming-fr-basket-colors-timer {
    margin: -4px 0 10px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1565c0;
}

.gaming-fr-basket-colors-timer--low {
    color: #e65100;
}

.gaming-fr-basket-colors-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gaming-fr-basket-color-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, 0.12);
    background: var(--basket-color, #2e7d32);
    cursor: pointer;
    padding: 0;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.gaming-fr-basket-color-btn:not(:disabled):hover {
    transform: scale(1.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.gaming-fr-basket-color-btn--selected {
    border-color: #ffeb3b;
    box-shadow: 0 0 0 2px #f9a825, 0 2px 10px rgba(0, 0, 0, 0.22);
}

.gaming-fr-basket-color-btn--taken {
    opacity: 0.35;
    cursor: not-allowed;
    filter: grayscale(0.35);
}

.gaming-fr-basket-colors-hint {
    margin: 12px 0 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(12, 85, 5, 0.08);
    font-size: 0.82rem;
    line-height: 1.4;
    font-weight: 600;
    color: #1b5e20;
}

.gaming-fr-basket-colors-hint--err {
    background: rgba(198, 40, 40, 0.12);
    color: #b71c1c;
}

.gaming-fr-player-color-swatch {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.15);
    margin-left: 6px;
}

.gaming-fr-player-color-swatch--chip {
    width: 12px;
    height: 12px;
    margin-left: 0;
}

.gaming-fr-join-req-who {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.gaming-fr-join-req-label {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
    font-size: 0.95rem;
    color: #1b5e20;
}

.gaming-fr-hud {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    left: 58px;
    right: max(10px, env(safe-area-inset-right));
    z-index: 10055;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    pointer-events: none;
}

.gaming-fr-hud-stats {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    width: 100%;
}

.gaming-fr-hud-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.gaming-fr-hud-mission,
.gaming-fr-hud-score,
.gaming-fr-hud-timer {
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid var(--green-dark, #0c5505);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.85rem;
    color: var(--green-dark, #0c5505);
}

.gaming-fr-hud-timer {
    flex: 0 0 auto;
    min-width: 5.2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 2px;
}

.gaming-fr-hud-timer strong {
    font-size: 1.2rem;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.gaming-fr-hud-booster-badge {
    display: inline-block;
    margin-top: 1px;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: #fff8e1;
    color: #8a5a00;
    border: 1px solid #f0c36a;
}

.gaming-fr-hud-booster-badge::before {
    content: '🏆 ';
}

.gaming-fr-hud-timer--urgent {
    border-color: #c62828;
    color: #b71c1c;
}

.gaming-fr-hud-timer--urgent .gaming-fr-hud-booster-badge {
    background: #ffebee;
    color: #b71c1c;
    border-color: #ef9a9a;
}

.gaming-fr-hud-booster-badge--won {
    background: #e8f5e9;
    color: #1b5e20;
    border-color: #81c784;
}

.gaming-fr-hud-booster-badge--lost {
    background: #eceff1;
    color: #546e7a;
    border-color: #b0bec5;
    text-decoration: line-through;
}

.gaming-fr-hud-mission {
    flex: 1 1 auto;
    min-width: 0;
}

.gaming-fr-hud-score {
    flex: 0 0 auto;
    min-width: 5.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gaming-fr-hud-score strong {
    font-size: 1.15rem;
    line-height: 1.1;
}

.gaming-fr-mission-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.gaming-fr-mission-chip {
    padding: 2px 6px;
    border-radius: 6px;
    background: #e8f5e9;
    font-weight: 600;
}

.gaming-fr-mission-chip--done {
    background: #c8e6c9;
    opacity: 0.75;
}

@media (max-width: 639px) {
    .gaming-fr-hud {
        left: 52px;
        right: 8px;
        top: max(6px, env(safe-area-inset-top));
    }

    .gaming-fr-hud-stats {
        flex-wrap: wrap;
        gap: 3px;
        align-items: center;
    }

    .gaming-fr-hud-mission,
    .gaming-fr-hud-score,
    .gaming-fr-hud-timer {
        border-radius: 6px;
        padding: 3px 6px;
        font-size: 0.72rem;
    }

    .gaming-fr-hud-mission {
        order: 1;
        flex: 1 1 100%;
        padding: 2px 6px;
    }

    .gaming-fr-hud-mission .gaming-fr-hud-label {
        display: none;
    }

    .gaming-fr-hud-mission .gaming-fr-mission-row {
        margin-top: 0;
        gap: 3px;
    }

    .gaming-fr-hud-timer {
        order: 2;
        flex: 1 1 auto;
        min-width: 0;
        flex-direction: row;
        align-items: center;
        gap: 5px;
        padding: 2px 6px;
    }

    .gaming-fr-hud-timer .gaming-fr-hud-label {
        display: none;
    }

    .gaming-fr-hud-timer strong {
        font-size: 0.92rem;
        line-height: 1;
        white-space: nowrap;
    }

    .gaming-fr-hud-booster-badge {
        display: inline-flex;
        align-items: center;
        gap: 1px;
        margin-top: 0;
        padding: 0 4px;
        font-size: 0.52rem;
        white-space: nowrap;
        max-width: none;
    }

    .gaming-fr-hud-score {
        order: 2;
        flex: 0 0 auto;
        min-width: 0;
        flex-direction: row;
        align-items: center;
        gap: 4px;
        padding: 2px 6px;
    }

    .gaming-fr-hud-score .gaming-fr-hud-label {
        display: none;
    }

    .gaming-fr-hud-score strong {
        font-size: 0.92rem;
        line-height: 1;
    }

    .gaming-fr-hud-label {
        font-size: 0.57rem;
        letter-spacing: 0.03em;
    }

    .gaming-fr-mission-row {
        gap: 3px;
        margin-top: 0;
    }

    .gaming-fr-mission-chip {
        padding: 1px 4px;
        border-radius: 4px;
        font-size: 0.68rem;
        line-height: 1.15;
    }
}

.gaming-fr-tilt-hint {
    position: fixed;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 10050;
    margin: 0;
    padding: 6px 12px;
    max-width: 92vw;
    text-align: center;
    font-size: 0.72rem;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gaming-fr-tilt-hint--visible {
    opacity: 1;
}

.gaming-fr-lobby {
    flex: 1;
    overflow-y: auto;
    padding: 64px 16px 24px;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.gaming-fr-lobby h2 {
    margin: 0 0 8px;
    color: #fff;
}

.gaming-fr-lobby-sub {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0 0 20px;
}

.gaming-fr-level-picker {
    margin-bottom: 16px;
}

.gaming-fr-level-picker label {
    display: block;
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.gaming-fr-level-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 2px solid var(--green-dark, #0c5505);
    font-size: 1rem;
    background: #fff;
}

.gaming-fr-lobby-actions {
    display: grid;
    gap: 12px;
}

.gaming-fr-join-row {
    display: grid;
    gap: 6px;
}

.gaming-fr-code-label {
    color: #fff;
    font-size: 0.85rem;
}

#gamingFrJoinCode {
    padding: 10px 12px;
    border-radius: 8px;
    border: 2px solid var(--green-dark, #0c5505);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.gaming-fr-room {
    margin-top: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    border: 2px solid var(--green-dark, #0c5505);
}

.gaming-fr-room-code {
    font-size: 1.1rem;
    margin: 0 0 8px;
}

.gaming-fr-player-list {
    list-style: none;
    margin: 12px 0;
    padding: 0;
}

.gaming-fr-player-item {
    --voice-level: 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0 10px;
    border-bottom: 1px solid #e0e0e0;
}

.gaming-fr-player-item-name {
    flex: 1;
    min-width: 0;
}

.gaming-fr-player-item--you {
    font-weight: 700;
    color: var(--green-dark, #0c5505);
}

.gaming-fr-player-mic {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    line-height: 1;
    border: 2px solid #cfd8dc;
    background: #eceff1;
    opacity: 0.55;
}

.gaming-fr-player-mic--on {
    border-color: #2e7d32;
    background: #e8f5e9;
    opacity: 1;
}

.gaming-fr-player-chip .gaming-fr-player-mic {
    width: 22px;
    height: 22px;
    font-size: 0.72rem;
}

.gaming-fr-lobby-voice {
    margin: 12px 0 4px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid #2e7d32;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.gaming-fr-lobby-voice[hidden] {
    display: none !important;
}

.gaming-fr-lobby-voice-invite {
    margin: 0 0 10px;
    font-size: 1.02rem;
    font-weight: 700;
    color: #1b5e20;
    line-height: 1.35;
}

.gaming-fr-lobby-voice-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gaming-fr-voice-btn--lobby {
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
    flex: 0 0 auto;
    border-color: #1b5e20;
}

.gaming-fr-lobby-voice-count {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #33691e;
}

.gaming-fr-lobby-voice-count--ok {
    color: #1b5e20;
}

.gaming-fr-lobby-voice-count--wait {
    color: #ef6c00;
}

.gaming-fr-lobby-voice-count--err {
    color: #c62828;
}

.gaming-fr-lobby-voice-sliders {
    display: grid;
    gap: 4px;
    margin-top: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(12, 85, 5, 0.28);
    border-radius: 10px;
}

.gaming-fr-lobby-voice-sliders .gaming-fr-voice-vol-label {
    margin-top: 4px;
}

.gaming-fr-lobby-voice-sliders input[type="range"] {
    width: 100%;
    margin: 0;
    accent-color: #2e7d32;
}

.gaming-fr-kick-btn {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin-left: auto;
    padding: 0;
    border: 1px solid #c62828;
    border-radius: 999px;
    background: #ffebee;
    color: #b71c1c;
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
}

.gaming-fr-kick-btn:hover {
    background: #ffcdd2;
}

.gaming-fr-player-chip .gaming-fr-kick-btn {
    width: 22px;
    height: 22px;
    margin-left: 2px;
    font-size: 0.95rem;
}

.gaming-fr-room-actions {
    display: grid;
    gap: 8px;
}

.gaming-fr-wait-host-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 16px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid #e65100;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    box-shadow: 0 2px 12px rgba(230, 81, 0, 0.2);
    animation: gaming-fr-wait-host-pulse 2.4s ease-in-out infinite;
}

.gaming-fr-wait-host-banner[hidden] {
    display: none !important;
}

.gaming-fr-wait-host-icon {
    flex: 0 0 auto;
    font-size: 1.55rem;
    line-height: 1.2;
}

.gaming-fr-wait-host {
    margin: 0;
    flex: 1;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.45;
    color: #4e342e;
    text-align: left;
}

.gaming-fr-wait-host-name {
    color: #bf360c;
    font-weight: 800;
}

@keyframes gaming-fr-wait-host-pulse {
    0%, 100% {
        box-shadow: 0 2px 12px rgba(230, 81, 0, 0.2);
    }
    50% {
        box-shadow: 0 4px 22px rgba(230, 81, 0, 0.38);
    }
}

.gaming-fr-status {
    margin-top: 12px;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.gaming-fr-status--err {
    background: #ffebee;
    color: #b71c1c;
}

.gaming-fr-status--ok {
    background: #e8f5e9;
    color: #1b5e20;
}

.gaming-fr-stage {
    position: relative;
    min-height: 0;
}

.gaming-fr-stage:not([hidden]) {
    flex: 1 1 auto;
    min-height: 55dvh;
    /* Playfield stretto: ceste/hitbox coerenti tra desktop e mobile */
    width: 100%;
    max-width: min(100%, 480px);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
}

.gaming-fr-stage-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: center / cover no-repeat;
    filter: saturate(1.05);
}

.gaming-fr-stage-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(135, 206, 235, 0.12) 0%, rgba(0, 0, 0, 0.06) 55%, rgba(62, 39, 35, 0.32) 100%);
    pointer-events: none;
}

.gaming-fr-host-hint {
    margin: 0 0 10px;
    font-size: 0.88rem;
    color: #1b5e20;
    line-height: 1.35;
}

.gaming-fr-canvas {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    background: transparent;
}

.gaming-fr-overlay {
    position: fixed;
    inset: 0;
    z-index: 10100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.72);
    padding: 20px;
    pointer-events: auto;
}

/* Fine partita: HUD a schermo pieno (niente card/popup), canvas + esplosione visibili sotto */
.gaming-fr-overlay--victory {
    background: radial-gradient(ellipse at center, rgba(12, 85, 5, 0.22) 0%, rgba(0, 0, 0, 0.38) 68%, rgba(0, 0, 0, 0.52) 100%);
    pointer-events: none;
    animation: gaming-fr-victory-fade 0.45s ease-out;
}

@keyframes gaming-fr-victory-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gaming-fr-overlay--victory .gaming-fr-overlay-inner {
    pointer-events: auto;
    max-width: min(440px, 94vw);
    text-align: center;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 12px 10px 20px;
    color: #fff;
}

.gaming-fr-overlay--celebrate {
    /* legacy alias: stessa lettura “in gioco” della victory */
    background: radial-gradient(ellipse at center, rgba(12, 85, 5, 0.22) 0%, rgba(0, 0, 0, 0.38) 68%, rgba(0, 0, 0, 0.52) 100%);
    pointer-events: none;
}

.gaming-fr-overlay--celebrate .gaming-fr-overlay-inner {
    pointer-events: auto;
    box-shadow: none;
}

.gaming-fr-overlay-inner {
    max-width: 360px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    padding: 24px 20px;
    border: 3px solid var(--green-dark, #0c5505);
}

.gaming-fr-overlay-points-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin: 4px 0 12px;
}

.gaming-fr-overlay-points-wrap[hidden] {
    display: none !important;
}

.gaming-fr-overlay-points {
    font-size: clamp(2.6rem, 14vw, 4.2rem);
    font-weight: 700;
    line-height: 1;
    color: #c9a227;
    font-variant-numeric: tabular-nums;
    display: inline-block;
    transform-origin: center bottom;
}

.gaming-fr-overlay--victory .gaming-fr-overlay-points {
    font-size: clamp(3rem, 18vw, 5rem);
    color: var(--yellow-accent, #ffd700);
    text-shadow: 0 4px 24px rgba(255, 215, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.55);
}

.gaming-fr-overlay-points--tick {
    animation: gaming-fr-points-tick 0.16s ease-out;
}

.gaming-fr-overlay-points-wrap--rolling .gaming-fr-overlay-points {
    text-shadow: 0 0 18px rgba(201, 162, 39, 0.45);
}

.gaming-fr-overlay--victory .gaming-fr-overlay-points-wrap--rolling .gaming-fr-overlay-points {
    text-shadow: 0 0 28px rgba(255, 215, 0, 0.85), 0 2px 8px rgba(0, 0, 0, 0.55);
}

@keyframes gaming-fr-points-tick {
    0% { transform: scale(1); }
    40% { transform: scale(1.14); }
    100% { transform: scale(1); }
}

.gaming-fr-overlay-points-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--green-dark, #0c5505);
}

.gaming-fr-overlay--victory .gaming-fr-overlay-points-label {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.gaming-fr-overlay-inner h2 {
    margin: 0 0 12px;
    color: var(--green-dark, #0c5505);
}

.gaming-fr-overlay--victory .gaming-fr-overlay-inner h2 {
    margin: 0 0 10px;
    font-size: clamp(1.05rem, 4.2vw, 1.35rem);
    color: var(--yellow-accent, #ffd700);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.gaming-fr-overlay--victory #gamingFrOverlayDesc {
    margin: 0 0 18px;
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

.gaming-fr-overlay--victory .gaming-btn-primary {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.gaming-fr-drawer-scrim {
    position: fixed;
    inset: 0;
    z-index: 10190;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.52);
    cursor: pointer;
}

.gaming-fr-drawer {
    --gaming-fr-drawer-width: min(88vw, 300px);
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: var(--gaming-fr-drawer-width);
    z-index: 10200;
    background: var(--green-dark, #0c5505);
    color: var(--yellow-accent, #ffd700);
    transform: translateX(-100%);
    transition: transform 0.22s ease-in-out;
    box-shadow: 4px 0 18px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.gaming-fr-drawer--open {
    transform: translateX(0);
    pointer-events: auto;
}

.gaming-fr-drawer-panel {
    position: relative;
    z-index: 1;
    height: 100%;
    overflow-y: auto;
    padding: 14px;
    -webkit-overflow-scrolling: touch;
    background: transparent;
    border-right: none;
}

.gaming-fr-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.gaming-fr-drawer-title {
    margin: 0;
    font-size: 1.15rem;
    color: var(--yellow-accent, #ffd700);
}

.gaming-fr-drawer-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--yellow-accent, #ffd700);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
}

.gaming-fr-drawer-link {
    display: block;
    margin-bottom: 14px;
    color: var(--yellow-accent, #ffd700);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gaming-fr-drawer-account {
    margin-bottom: 14px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 215, 0, 0.28);
}

.gaming-fr-drawer-account-name {
    font-weight: 700;
    margin: 0 0 4px;
    color: #fff;
}

.gaming-fr-drawer-account-points {
    margin: 0;
    font-size: 0.9rem;
    color: var(--yellow-accent, #ffd700);
}

.gaming-fr-drawer-share,
.gaming-fr-drawer-leave,
.gaming-fr-drawer-btn {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    color: var(--yellow-accent, #ffd700);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.gaming-fr-drawer-share:hover,
.gaming-fr-drawer-leave:hover,
.gaming-fr-drawer-btn:hover {
    background: rgba(0, 0, 0, 0.35);
}

.gaming-fr-drawer-booster {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 215, 0, 0.28);
}

.gaming-fr-drawer-booster[hidden] {
    display: none !important;
}

.gaming-fr-basket-shop-back {
    width: 100%;
    margin: 0 0 12px;
    text-align: left;
}

.gaming-fr-drawer-booster-title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--yellow-accent, #ffd700);
}

.gaming-fr-drawer-booster-desc,
.gaming-fr-drawer-booster-price {
    margin: 0 0 10px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
}

.gaming-fr-drawer-booster-owned {
    margin: 0 0 8px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #a5d6a7;
}

.gaming-fr-drawer-booster-tier {
    margin: 14px 0 0;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.28);
    background: rgba(0, 0, 0, 0.16);
}

.gaming-fr-drawer-booster-tier-title {
    margin: 0 0 6px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
}

.gaming-fr-paypal-buttons {
    min-height: 42px;
}

.gaming-fr-drawer-booster-status {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: #ffe082;
}

/* Pagine play: mai il menu laterale del sito (solo drawer gioco via ☰). */
body.gaming-fr-play .side-nav,
body.gaming-cw-play .side-nav {
    display: none !important;
}

.gaming-fr-join-overlay {
    position: fixed;
    inset: 0;
    z-index: 10150;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 72px 16px 24px;
    background: rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}

.gaming-fr-join-overlay[hidden] {
    display: none !important;
}

.gaming-fr-join-overlay-inner {
    width: min(420px, 100%);
    max-height: min(70vh, 520px);
    overflow: auto;
}

.gaming-fr-join-overlay .gaming-fr-join-requests,
.gaming-fr-join-overlay .gaming-fr-waiting-join {
    margin-top: 0;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
}

.gaming-fr-join-requests {
    margin-top: 16px;
    padding: 14px 14px 12px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 12px;
    border: 2px solid #ff9800;
}

.gaming-fr-join-req-title {
    margin: 0 0 12px;
    font-weight: 700;
    color: #e65100;
}

.gaming-fr-join-req-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    background: #fff8e1;
    border: 1px solid #ffe0b2;
    border-radius: 10px;
}

.gaming-fr-join-req-row:last-child {
    margin-bottom: 0;
}

.gaming-fr-join-req-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: stretch;
    padding-top: 2px;
    border-top: 1px solid rgba(230, 81, 0, 0.18);
}

.gaming-fr-join-req-actions .gaming-btn-primary,
.gaming-fr-join-req-actions .gaming-btn-ghost {
    flex: 1 1 0;
    min-width: 7.5rem;
    justify-content: center;
    text-align: center;
}

.gaming-fr-join-voted {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.88rem;
    color: #2e7d32;
    font-weight: 600;
    padding: 6px 0 2px;
}

.gaming-fr-waiting-join {
    margin-top: 16px;
    padding: 14px;
    background: #fff8e1;
    border: 2px solid #ffc107;
    border-radius: 10px;
    text-align: center;
}

.gaming-fr-sync-overlay {
    background: rgba(0, 0, 0, 0.55);
    z-index: 10150;
}

.gaming-fr-sync-inner {
    text-align: center;
    color: #fff;
}

.gaming-fr-sync-label {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.gaming-fr-sync-count {
    margin: 0;
    font-size: clamp(3rem, 22vw, 5rem);
    font-weight: 700;
    line-height: 1;
}
