/* Invite and share-result buttons: same dark button language as .btn-secondary, 44px touch target */
.invite-block {
    max-width: 320px;
    margin: 30px auto 0;
    text-align: center;
}

.invite-button,
.share-result {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    font-size: 16px;
}

.invite-button:focus-visible,
.share-result:focus-visible {
    outline: 3px solid #ffd700;
    outline-offset: 3px;
}

.victory-content .share-result:focus-visible {
    outline-color: #333;
}

.share-status {
    min-height: 1.4em;
    margin-top: 8px;
    font-size: 0.95em;
    color: #ffffff;
}

.victory-content .share-status {
    color: #333;
    font-size: 1em;
    margin-bottom: 0;
}

.site-footer {
    text-align: center;
    padding: 20px;
    background: #ffffff;
    border-radius: 15px;
}

.site-footer a {
    color: #333366;
    padding: 12px;
    display: inline-block;
}

.card-header-with-button .role-details {
    flex: 1 1 200px;
    min-width: 0;
}

/* Resume banner and persistence notices: non-modal, fixed to the bottom edge */
.resume-banner,
.persist-notice {
    background-color: #dce5dc;
    color: #1b1b1b;
    border-radius: 12px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
    width: calc(100% - 24px);
    max-width: 560px;
    padding: 14px 16px;
}

.resume-banner {
    position: fixed;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    /* Below every modal (lowest is .modal at 1000), so opening another game never hides its start button;
       above the install banner (900), which sits on the same spot and would hide Riprendi and Scarta. */
    z-index: 950;
}

.resume-banner h2 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.resume-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.resume-actions button {
    flex: 1 1 120px;
    min-height: 44px;
}

.persist-notices {
    position: fixed;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    z-index: 1600;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: center;
    pointer-events: none;
}

.persist-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
}

.persist-notice span {
    flex: 1 1 auto;
    overflow-wrap: anywhere;
}

.persist-notice button {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 14px;
    border: 2px solid #1b1b1b;
    border-radius: 8px;
    background: transparent;
    color: #1b1b1b;
    font: inherit;
    cursor: pointer;
}

.persist-notice button:focus-visible,
.resume-actions button:focus-visible {
    outline: 3px solid #1b1b1b;
    outline-offset: 2px;
}

/* "Come si gioca" guide: card/setup buttons and the 60-second modal. */
.howto-button {
    position: relative;
    z-index: 3;
    margin-top: 20px;
    padding: 12px 24px;
    min-height: 44px;
    font-size: 1em;
    font-weight: 600;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid #ffffff;
    border-radius: 8px;
    cursor: pointer;
}

.howto-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.howto-button:focus-visible {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

.howto-button-inline {
    display: block;
    margin: 0 0 15px;
    color: #1b1b1b;
    background: transparent;
    border-color: #1b1b1b;
}

.howto-button-inline:hover {
    background: rgba(0, 0, 0, 0.08);
}

.howto-modal {
    z-index: 1100;
}

.howto-steps {
    margin: 15px 0 0 1.4em;
    padding: 0;
    line-height: 1.5;
}

.howto-steps li {
    margin-bottom: 12px;
}

.composition-preview {
    margin: 0 0 20px;
    line-height: 1.5;
    font-size: 0.95em;
}

/* Glitch Mind: which phase the table is in, and who opens the word round. */
.glitch-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.glitch-steps li {
    padding: 6px 2px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.8em;
    font-weight: 700;
    color: #3a3a4a;
    background: #c9d3c9;
}

.glitch-steps li[aria-current="step"] {
    color: #ffffff;
    background: #2a2a2a;
}

.glitch-first-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 10px;
    border-radius: 999px;
    font-size: 0.8em;
    font-weight: 700;
    color: #ffffff;
    background: #2a2a2a;
}
