.spunti { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.spunto {
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid var(--brand-20);
    background: var(--surface);
    font-size: 11.5px; color: var(--brand-dark);
    transition: background .15s, border-color .15s;
}
.spunto:hover:not(:disabled) { background: var(--brand-10); border-color: var(--brand); }
.spunto:disabled { opacity: .5; cursor: default; }

.games { display: grid; gap: 10px; }
.game {
    display: grid; grid-template-columns: 52px 1fr; gap: 12px;
    padding: 14px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}
.game:hover { border-color: var(--brand-20); box-shadow: 0 8px 22px rgba(11,146,133,.08); }
.game__icon {
    width: 52px; height: 52px; border-radius: 14px;
    object-fit: contain; background: var(--brand-10); padding: 6px;
}
.game__body { min-width: 0; }
.game__nome { font-size: 15px; font-weight: 700; margin: 2px 0 4px; }
.game__sommario { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.game__gioca {
    padding: 8px 16px; border-radius: 999px;
    background: var(--brand); color: #fff;
    font-size: 12.5px; font-weight: 700;
    transition: background .15s;
}
.game__gioca:hover { background: var(--brand-dark); }

.game .game__gioca { grid-column: 1 / -1; justify-self: end; margin-top: 4px; }

.editor {
    display: grid; gap: 8px;
    margin: 2px 0;
    padding: 14px;
    border: 1px solid var(--brand-20); border-radius: var(--radius-sm);
    background: rgba(255,255,255,.96);
    box-shadow: 0 6px 16px rgba(11,146,133,.06);
}
.editor__etichetta { font-size: 12.5px; font-weight: 700; color: var(--brand-dark); }
.editor__campo {
    width: 100%; min-height: 118px; max-height: 240px; resize: vertical;
    padding: 10px 12px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    font-family: inherit; font-size: 13px; line-height: 1.55;
}
.editor__campo:focus {
    outline: none; border-color: var(--brand-20);
    box-shadow: 0 0 0 3px var(--brand-10);
}
.editor__piede { display: flex; align-items: center; gap: 8px; }
.editor__conta { margin-right: auto; font-size: 11.5px; color: var(--text-3); }
.editor__secondario {
    padding: 7px 12px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface);
    font-size: 12px; font-weight: 600; color: var(--text-2);
}
.editor__secondario:hover { color: var(--brand-dark); border-color: var(--brand-20); }
.editor__categorie { margin-top: 2px; }
.editor__categorie-titolo {
    display: inline-block;
    font-size: 11.5px; font-weight: 600; color: var(--brand-dark);
    cursor: pointer; list-style: none;
}
.editor__categorie-titolo::-webkit-details-marker { display: none; }
.editor__categorie-titolo::before { content: "+ "; font-weight: 700; }
.editor__categorie[open] .editor__categorie-titolo::before { content: "− "; }
.editor__categorie-lista {
    margin: 8px 0 2px; padding-left: 16px;
    column-count: 2; column-gap: 16px;
    font-size: 11.5px; line-height: 1.5; color: var(--text-2);
}
.editor__categorie-lista li { break-inside: avoid; margin-bottom: 3px; }
@media (max-width: 560px) { .editor__categorie-lista { column-count: 1; } }

.editor__azione {
    padding: 8px 18px; border-radius: 999px;
    background: var(--brand); color: #fff;
    font-size: 12.5px; font-weight: 700;
}
.editor__azione:hover { background: var(--brand-dark); }
.editor__azione:disabled { opacity: .5; cursor: default; }

.vittoria {
    align-self: center;
    width: 100%; max-width: 400px;
    margin: 6px 0 2px;
    padding: 20px 22px 18px;
    border: 1px solid var(--brand-20);
    border-radius: var(--radius);
    background:
        radial-gradient(130% 100% at 50% -20%, rgba(11,146,133,.16), rgba(11,146,133,0) 64%),
        var(--surface);
    box-shadow: 0 8px 26px rgba(11,146,133,.10);
    text-align: center;
    animation: vittoriaIn .34s cubic-bezier(.2,.8,.3,1);
}
@keyframes vittoriaIn {
    from { opacity: 0; transform: translateY(7px) scale(.98); }
    to { opacity: 1; transform: none; }
}

.vittoria__segno {
    display: grid; place-items: center;
    width: 56px; height: 56px; margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--brand-10); color: var(--brand);
    box-shadow: 0 6px 16px rgba(11,146,133,.14), 0 0 0 1px var(--brand-20);
}
.vittoria__segno img { display: block; width: 38px; height: 38px; object-fit: contain; }
.vittoria__segno svg { display: block; }
.vittoria__titolo {
    margin: 0 0 7px;
    font-size: 27px; line-height: 1.12; letter-spacing: -.02em;
    color: var(--brand-dark);
}
.vittoria__testo { font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.vittoria__punteggio {
    margin-top: 14px;
    font-size: 10px; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--text-3);
}
.vittoria__punteggio strong {
    display: block; margin-bottom: 3px;
    font-size: 32px; line-height: 1; letter-spacing: -.03em;
    text-transform: none; color: var(--text);
    font-variant-numeric: tabular-nums;
}
.vittoria__fili {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 5px; margin-top: 13px; padding-top: 13px;
    border-top: 1px solid var(--line);
}
.vittoria__anello {
    padding: 4px 9px; border-radius: 999px;
    border: 1px solid var(--brand-20); background: var(--surface-solid);
    font-size: 11px; color: var(--brand-dark); white-space: nowrap;
}

.vittoria__anello--ultimo {
    background: var(--brand); border-color: var(--brand); color: #fff;
}
.nota-gioco {
    align-self: center;
    margin: 2px 0;
    font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--text-3);
}

.partita {
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin: 8px 16px 0;
    padding: 7px 8px 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--brand-20);
    background: var(--brand-10);
    font-size: 12px; color: var(--brand-dark);
}
.partita[hidden] { display: none; }
.partita__stato { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.partita__stato img { width: 14px; height: 14px; display: block; opacity: .85; flex-shrink: 0; }
.partita__testo { color: var(--text-2); }
.partita__nome {
    font-weight: 700; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

.pallini { display: inline-flex; gap: 3px; margin-left: 2px; }
.pallini i {
    width: 4px; height: 4px; border-radius: 50%;
    background: currentColor; opacity: .25;
    animation: pallino 1.3s ease-in-out infinite;
}
.pallini i:nth-child(2) { animation-delay: .18s; }
.pallini i:nth-child(3) { animation-delay: .36s; }
@keyframes pallino {
    0%, 70%, 100% { opacity: .25; transform: translateY(0); }
    35% { opacity: 1; transform: translateY(-2px); }
}

.lavoro {
    display: inline-flex; align-items: center; gap: 9px;
    max-width: 100%;
    padding: 7px 12px 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--brand-20);
    background: var(--brand-10);
    color: var(--brand-dark);
    font-size: 12.5px; font-weight: 600; line-height: 1.2;
}
.lavoro__testo {
    min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lavoro__passo {
    flex-shrink: 0;
    padding: 2px 8px; border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    border: 1px solid var(--brand-20);
    font-size: 11px; font-weight: 700; letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
}
.lavoro__passo[hidden] { display: none; }
.lavoro .pallini { margin-left: 0; }
.lavoro .pallini i { width: 5px; height: 5px; opacity: .3; }

.message.message--lavoro {
    background: transparent; border: 0; box-shadow: none;
    padding: 0; max-width: 100%;
}
@media (prefers-reduced-motion: reduce) {
    .lavoro .pallini i { opacity: .55; }
}

.partita__fine {
    padding: 4px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600; color: var(--brand-dark);
    border: 1px solid var(--brand-20); background: rgba(255,255,255,.7);
}
.partita__fine:hover { background: var(--surface); }

.partita__azioni { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }

.partita__nuova {
    padding: 4px 11px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700;
    color: #fff; background: var(--brand); border: 1px solid var(--brand);
    transition: background .15s, border-color .15s;
}
.partita__nuova:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.partita__nuova[hidden] { display: none; }

[data-suggerimento] { position: relative; }
[data-suggerimento]::after {
    content: attr(data-suggerimento);
    position: absolute; left: 50%; bottom: calc(100% + 8px);
    transform: translate(-50%, 4px);
    padding: 7px 11px; border-radius: 10px;
    background: var(--ink); color: #fff;
    font-size: 11.5px; font-weight: 700; line-height: 1.35; white-space: nowrap;
    box-shadow: 0 10px 24px rgba(7,33,30,.18);
    pointer-events: none; opacity: 0; z-index: 30;
    transition: opacity .15s var(--ease-premium), transform .15s var(--ease-premium);
}
[data-suggerimento]:hover::after,
[data-suggerimento]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

[data-suggerimento][data-lato="destro"]::after {
    left: auto; right: 0; transform: translateY(4px);
}
[data-suggerimento][data-lato="destro"]:hover::after,
[data-suggerimento][data-lato="destro"]:focus-visible::after { transform: translateY(0); }

.gi-page .message__actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
}
.gi-page .message__disclaimer {
    font-size: 10.5px;
    color: #008188;
    line-height: 1.25;
}

.msg-copy {
    width: 24px; height: 24px;
    display: grid; place-items: center;
    margin-left: auto;
    border-radius: 8px;
    opacity: .45;
    transition: opacity .15s, background .15s, width .15s ease, padding .15s ease;
}
.msg-copy:hover { opacity: 1; background: var(--brand-10); }
.msg-copy img { width: 13px; height: 13px; display: block; }
.msg-copy.is-ok { background: var(--brand); opacity: 1; }
.msg-copy.is-ok img { filter: brightness(0) invert(1); }

.msg-copy.is-esito {
    width: auto; padding: 0 8px;
    font: inherit;
    font-size: 10.5px; font-weight: 700; line-height: 1;
    letter-spacing: .02em; white-space: nowrap;
    color: #fff;
    background: var(--brand);
    opacity: 1;
}
.msg-copy.is-esito { height: 24px; margin-left: auto; }
.msg-copy.is-errore {
    width: auto; padding: 0 8px;
    font: inherit;
    font-size: 10.5px; font-weight: 700; line-height: 1;
    white-space: nowrap; opacity: 1;
    background: var(--status-danger-bg-strong); color: var(--status-danger);
}

.is-esito[data-suggerimento]::after,
.is-errore[data-suggerimento]::after { display: none; }

.racconto {
    position: sticky; top: 0; z-index: 2;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--brand-20);
    border-radius: var(--radius-sm);
    background: linear-gradient(var(--brand-10), var(--brand-10)), var(--surface-solid);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), var(--shadow-soft);
    max-height: 164px; overflow-y: auto;
    font-size: 12.5px; line-height: 1.55;
}

.racconto__meta {
    position: sticky; top: 0; z-index: 1;
    display: flex; align-items: center; gap: 7px;
    padding: 6px 11px 6px 12px;
    background: linear-gradient(var(--brand-10), var(--brand-10)), var(--surface-solid);
    border-bottom: 1px solid var(--line);
    font-size: 10.5px; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--brand-dark);
}
.racconto__marchio {
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: var(--brand);
}
.racconto__marchio svg { display: block; }
.racconto__marchio .racconto__piuma { width: 16px; height: 16px; display: block; object-fit: contain; }

.racconto__etichetta {
    min-width: 0; text-transform: none; letter-spacing: .01em;
    font-size: 11.5px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.racconto__testo {
    padding: 9px 14px 10px 15px;
    font-size: 13.5px; line-height: 1.62;
    color: var(--text);
}

.racconto__piede {
    display: flex; align-items: center; gap: 10px;
    margin: 0 11px 0 15px; padding: 6px 0 9px;
    border-top: 1px dashed var(--line);
}

.racconto__avviso {
    flex: 1 1 auto; min-width: 0;
    font-family: inherit;
    font-style: normal;
    font-size: 10.5px; color: var(--brand); opacity: .85; line-height: 1.25;
}
.racconto__copia { flex-shrink: 0; }

.tono { min-width: 240px; }
.tono__nome {
    margin: 0 0 2px;
    font-size: 21px; line-height: 1.2; font-weight: 600;
    letter-spacing: -.015em; color: var(--text);
}
.tono__scala {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 4px; margin: 10px 0 8px;
}
.tono__gradino {
    height: 6px; border-radius: 999px; opacity: .22;
    transition: opacity .25s ease, transform .25s ease;
}
.tono__gradino.is-attivo { opacity: 1; transform: scaleY(1.5); }
.tono__gradino--0 { background: var(--status-danger); }
.tono__gradino--1 { background: var(--status-warning); }
.tono__gradino--2 { background: var(--text-3); }
.tono__gradino--3 { background: var(--brand); }
.tono__gradino--4 { background: var(--brand-dark); }
.tono__confidenza {
    font-size: 11.5px; color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.tono--0 .tono__nome { color: var(--status-danger); }
.tono--1 .tono__nome { color: var(--status-warning); }
.tono--2 .tono__nome { color: var(--text-2); }
.tono--3 .tono__nome { color: var(--brand); }
.tono--4 .tono__nome { color: var(--brand-dark); }
@media (prefers-reduced-motion: reduce) {
    .tono__gradino.is-attivo { transform: none; }
}

.categoria { min-width: 240px; }
.categoria__nome {
    margin: 0 0 10px;
    font-size: 19px; line-height: 1.25; font-weight: 600;
    letter-spacing: -.01em; color: var(--text);
}
.categoria__barra {
    height: 6px; border-radius: 999px; overflow: hidden;
    background: var(--brand-10);
}
.categoria__riempimento {
    display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--brand-dark));
    transition: width .35s ease;
}
.categoria__confidenza {
    margin-top: 7px;
    font-size: 11.5px; color: var(--text-3);
    font-variant-numeric: tabular-nums;
}
.parole-chiave {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.parola-chiave {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: default;
}
.parola-chiave:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

.msg-testo {
    display: inline-grid; place-items: center;
    width: 22px; height: 22px;
    margin: 0 4px;
    vertical-align: -.15em;
    border-radius: 7px;
    background: rgba(255,255,255,.16);
    transition: background .15s;
}
.msg-testo:hover { background: rgba(255,255,255,.3); }
.msg-testo:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.msg-testo img {
    width: 13px; height: 13px; display: block;
    filter: brightness(0) invert(1); opacity: .9;
}

.modal--testo { width: min(620px, calc(100vw - 28px)); }

.testo__riquadro { position: relative; }
.testo__corpo {
    max-height: min(46vh, 340px); overflow-y: auto;
    padding: 14px 16px 44px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--bg);
    font-size: 13px; line-height: 1.65; color: var(--text);
    white-space: pre-wrap; overflow-wrap: anywhere;
}
.testo__copia {
    position: absolute; right: 8px; bottom: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 1px 4px rgba(7,33,30,.06);
    opacity: .8;
}
.testo__copia:hover { opacity: 1; }

.gi-catalogo { width: min(560px, 100%); margin: 8px auto 24px; display: grid; gap: 12px; }
.gi-catalogo[hidden] { display: none; }
.gi-catalogo__titolo { font-size: 20px; font-weight: 700; color: var(--text); }
.gi-catalogo__lead { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.gi-page .composer[hidden] { display: none; }
.editor[hidden],
.racconto[hidden] { display: none; }
.gi-page .composer textarea:disabled { cursor: not-allowed; }
.gi-page .editor { width: min(640px, 100%); align-self: center; }
