/* Free games + games account (docs/free-games.md). Uses the site's tokens from site.css. */

/* ── "who's playing" strip ─────────────────────────────────────────── */
.pbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 16px 0 0; }
.pbar__who { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.pbar__av { width: 34px; height: 34px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-weight: 700; flex: none; }
.pbar__links { display: flex; flex-wrap: wrap; gap: 8px; }
.pbar form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--green); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; min-height: 32px; }

/* ── game cards ────────────────────────────────────────────────────── */
.gcards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 20px; }
@media (min-width: 760px) { .gcards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.gcard { background: #fff; border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); box-shadow: 0 1px 2px rgba(18,53,33,.06), 0 6px 18px rgba(18,53,33,.10); }
.gcard:hover { color: var(--ink); }
.gcard__badge { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-family: var(--serif); font-size: 22px; }
.gcard__t { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.gcard__s { color: var(--gold-ink); font-weight: 600; font-size: 15px; }
.gcard__p { color: var(--ink-soft); font-size: 15px; margin: 0; flex: 1; }
.gcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gcard__best { font-size: 14px; color: var(--ink-muted); }
.gcard--off { opacity: .6; box-shadow: none; border: 1px dashed var(--line-strong); }
.badge-soon { font-size: 13px; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .06em; }

/* ── setup ─────────────────────────────────────────────────────────── */
.gsetup { scroll-margin-top: 90px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 20px; margin-top: 16px; max-width: 640px; }
.gsetup h2 { font-size: 22px; margin: 0 0 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: #fff; font-weight: 600; cursor: pointer; }
.seg input:checked + label { background: var(--green); border-color: var(--green); color: #fff; }
.seg input:focus-visible + label { outline: 3px solid var(--gold-line); outline-offset: 2px; }
.lbl { font-weight: 700; font-size: 15px; display: block; }

/* ── the game (Italian festa look, owner 2026-10-15) ───────────────── */
.gstage { max-width: 680px; margin: 16px auto 0; scroll-margin-top: 90px; }
.btn--lg { min-height: 56px; font-size: 18px; padding-left: 24px; padding-right: 24px; }
.gstart { margin-top: 6px; box-shadow: 0 6px 0 var(--red-dark); transition: transform .08s, box-shadow .08s; }
.gstart:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--red-dark); }

/* level map: a path of 10 stops */
.gmap-head { display: flex; justify-content: space-between; align-items: baseline; }
.gmap-head__stars { color: var(--gold); font-weight: 700; font-size: 15px; }
.gmap { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 92px; row-gap: 6px; margin: 10px 0 4px; padding: 0 4px; }
.gmap__track { position: absolute; left: 10%; right: 10%; top: 28px; height: calc(92px + 6px); border: 4px dashed var(--gold-line); border-left: 0; border-radius: 0 46px 46px 0; pointer-events: none; }
.gmap__node { display: flex; justify-content: center; position: relative; z-index: 1; }
.gmap__node input { position: absolute; opacity: 0; pointer-events: none; }
.gmap__node label { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.gmap__dot { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 21px;
    background: #fff; color: var(--green); border: 3px solid var(--green); box-shadow: 0 4px 0 var(--green-deep); transition: transform .12s; }
.gmap__node label:hover .gmap__dot { transform: translateY(-2px); }
.gmap__node input:checked + label .gmap__dot { background: var(--green); color: #fff; transform: scale(1.12); box-shadow: 0 4px 0 var(--green-deep), 0 0 0 6px rgba(27,77,46,.15); }
.gmap__node input:focus-visible + label .gmap__dot { outline: 3px solid var(--gold-line); outline-offset: 3px; }
.gmap__node.is-locked label { cursor: not-allowed; }
.gmap__node.is-locked .gmap__dot { background: #f1efe9; color: var(--ink-muted); border-color: var(--line-strong); box-shadow: 0 4px 0 var(--line-strong); font-size: 18px; }
.gmap__stars { display: flex; gap: 1px; font-size: 14px; line-height: 1; }
.gmap__stars i { font-style: normal; color: var(--line-strong); }
.gmap__stars i.is-on { color: #e8b64c; text-shadow: 0 1px 0 var(--gold); }
.gmap__node.is-locked .gmap__stars { visibility: hidden; }

/* head-up display */
.ghud { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ghud__lvl { background: var(--green); color: #fff; font-weight: 800; border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.ghud__combo { font-weight: 800; color: var(--ink-muted); background: #f1efe9; border-radius: 999px; padding: 4px 10px; font-size: 14px; opacity: .55; transition: opacity .2s; }
.ghud__combo.is-on { opacity: 1; background: #fff1e0; color: #c2410c; }
.ghud__combo.is-burst { animation: gburst .5s ease-out; }
.ghud__score { margin-left: auto; font-size: 15px; color: var(--ink-soft); }
.ghud__score b { font-size: 22px; color: var(--green); display: inline-block; }
.ghud__score b.is-bump { animation: gbump .35s ease-out; }
.gmute { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: #fff; font-size: 18px; cursor: pointer; line-height: 1; }
.gmute:hover { border-color: var(--green); }
.gdots { display: flex; gap: 5px; margin: 10px 0 14px; }
.gdots i { flex: 1; height: 8px; border-radius: 4px; background: var(--line); transition: background .25s; }
.gdots i.now { background: var(--gold-line); }
.gdots i.ok { background: #1f9d55; }
.gdots i.no { background: var(--red); }
.gdots i.done { background: #b9c7bd; }

/* countdown */
.gcount { min-height: 300px; display: grid; place-content: center; text-align: center; border-radius: 22px; color: #fff;
    background: radial-gradient(circle at 50% 40%, #2f8f55, var(--green-deep)); box-shadow: 0 10px 30px rgba(18,53,33,.25); }
.gcount__ready { font-size: 20px; font-weight: 700; letter-spacing: .04em; color: #d6e3da; }
.gcount__n { font-family: var(--serif); font-size: 120px; line-height: 1.05; }
.gcount__n.is-go { color: #e8b64c; }
.gcount__n.is-pop { animation: gpop .55s cubic-bezier(.2, 1.6, .4, 1); }

/* the question card */
.gcardq { background: #fff; border-radius: 22px; padding: 26px 20px 20px; text-align: center; position: relative; overflow: hidden;
    box-shadow: 0 2px 0 var(--line-strong), 0 10px 28px rgba(18,53,33,.12); }
.gcardq::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, #1f7a45 33.3%, #fff 33.3% 66.6%, var(--red) 66.6%); }
.gcardq.is-in { animation: gin .35s ease-out; }
.gcardq.is-shake { animation: gshake .45s; }
.gcardq__pron { display: inline-block; background: var(--gold-soft); color: var(--gold-ink); border-radius: 999px; padding: 2px 14px; font-weight: 700; font-size: 18px; margin-bottom: 6px; }
.gcardq__word { font-family: var(--serif); font-size: clamp(32px, 8vw, 50px); line-height: 1.1; word-break: break-word; }
.gcardq__hint { color: var(--ink-soft); margin-top: 6px; font-size: 16px; }
.gcardq__prompt { font-size: 22px; line-height: 1.35; margin: 4px 0; }
.gcardq__prompt[lang="si"] { font-family: 'Noto Sans Sinhala', var(--sans); }
.gcardq__prompt + .gcardq__prompt { color: var(--ink-soft); font-size: 17px; }
.gcardq__focus { font-size: 14px; color: var(--gold-ink); margin-top: 8px; }
.gtimer { position: relative; height: 14px; border-radius: 7px; background: #f1efe9; overflow: hidden; margin-top: 20px; }
.gtimer i { display: block; height: 100%; background: linear-gradient(90deg, #1f9d55, #2f8f55); width: 100%; transform-origin: left; }
.gtimer span { position: absolute; right: 8px; top: -1px; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.gtimer--low i { background: var(--red); }
.gtimer--low { animation: gpulse .5s infinite alternate; }
/* Melitalia Challenge overtime: the clock runs on in red (−1s, −2s…), points going down. */
.gtimer--over { background: #fde7e9; }
.gtimer--over i { background: var(--red); transform-origin: left; }
.gtimer--over span { color: var(--red); font-weight: 800; }
.gfb__over { margin-top: 6px; font-weight: 700; color: #b0341f; }

/* answer tiles: four Italian colours, 3D press */
.gopts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.gopt { --c: #1f7a45; --s: #14532d; position: relative; min-height: 72px; border-radius: 16px; border: 0; background: var(--c); color: #fff;
    font: inherit; font-size: 22px; font-weight: 800; cursor: pointer; padding: 10px 12px 10px 36px; word-break: break-word;
    box-shadow: 0 6px 0 var(--s); transition: transform .08s, box-shadow .08s, opacity .2s, filter .2s; }
.gopt--1 { --c: var(--red); --s: var(--red-dark); }
.gopt--2 { --c: #c9962f; --s: #8a6417; }
.gopt--3 { --c: #2b6cb0; --s: #1d4e82; }
.gopt__k { position: absolute; left: 10px; top: 8px; font-size: 13px; font-weight: 800; opacity: .75; }
.gopt:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-1px); }
.gopt:active:not(:disabled), .gopt.is-picked { transform: translateY(4px); box-shadow: 0 2px 0 var(--s); }
.gopt:disabled { cursor: default; }
.gopt.is-right { --c: #1f9d55; --s: #14532d; animation: gright .5s ease-out; box-shadow: 0 6px 0 var(--s), 0 0 0 4px #bfe8cf; transform: none; }
.gopt.is-right::after { content: "✓"; position: absolute; right: 12px; top: 8px; font-size: 18px; }
.gopt.is-wrong { --c: #7a1c24; --s: #4a0f15; }
.gopt.is-wrong::after { content: "✗"; position: absolute; right: 12px; top: 8px; font-size: 18px; }
.gopt.is-dim { opacity: .35; }

.gtype { margin-top: 16px; display: grid; gap: 10px; }
.gtype textarea { width: 100%; min-height: 100px; border-radius: 16px; border: 2.5px solid var(--line-strong); padding: 12px 14px; font: inherit; font-size: 20px; resize: vertical; background: #fff; color: var(--ink); transition: border-color .2s; }
.gtype textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(27,77,46,.12); }
.gtype textarea.is-right { border-color: #1f9d55; background: #f1faf4; }
.gtype textarea.is-wrong { border-color: var(--red); background: #fff7f6; }
.gtype__row { display: flex; gap: 10px; flex-wrap: wrap; }
.gtype__row .btn { flex: 1; }

/* feedback */
.gcombo { margin-top: 14px; text-align: center; font-weight: 800; font-size: 20px; color: #c2410c; animation: gpop .5s cubic-bezier(.2, 1.6, .4, 1); }
.gcombo b { color: var(--gold); }
.gfb { margin-top: 12px; border-radius: 16px; padding: 14px 16px; font-size: 16px; animation: gin .25s ease-out; }
.gfb--ok { background: #e3f4e8; color: #14532d; }
.gfb--no { background: var(--red-soft); color: var(--red-dark); }
.gfb__t { font-weight: 800; font-size: 19px; }
.gfb__pts { float: right; font-weight: 800; }
.gfb__tip { margin-top: 8px; color: var(--ink-soft); white-space: pre-line; font-size: 15px; }
/* Melitalia Challenge answer checks (docs/challenge-answer-checks.md). */
.gfb__also { margin-top: 6px; font-weight: 600; color: var(--ink-soft); }
.gappeal { margin-top: 10px; font-size: 14px; }
.gwords { margin-top: 8px; line-height: 2; }
.gwords span { padding: 2px 4px; border-radius: 6px; margin-right: 2px; }
.gw-same { background: #d3eedc; }
.gw-accent, .gw-typo { background: var(--gold-soft); }
.gw-wrong, .gw-extra { background: #f8d3cf; text-decoration: line-through; }
.gw-missing { background: #fff; border: 1px dashed var(--red); }
.gnext { margin-top: 12px; position: relative; overflow: hidden; }
.gnext.is-auto::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: rgba(255,255,255,.55); transform-origin: left; animation: gdrain var(--auto, 1.3s) linear forwards; }
.gfloat { position: absolute; z-index: 60; transform: translate(-50%, 0); font-weight: 900; font-size: 26px; color: #1f9d55; pointer-events: none;
    text-shadow: 0 2px 0 #fff, 0 0 8px #fff; animation: gfloat 1.1s ease-out forwards; }
.gfloat--combo { color: #c2410c; font-size: 30px; }
.gconfetti { position: fixed; inset: 0; z-index: 70; pointer-events: none; }

/* the signup wall */
.gwall { background: radial-gradient(circle at 50% 0%, #2f8f55, var(--green-deep)); color: #fff; border-radius: 22px; padding: 28px 20px; text-align: center; }
.gwall__badge { font-size: 46px; animation: gpop .6s cubic-bezier(.2, 1.6, .4, 1); }
.gwall h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 4px 0 8px; }
.gwall p { color: #d6e3da; margin: 0 0 18px; }
.gwall .btn { margin: 4px; }
.gwall .btn--outline { background: transparent; color: #fff; border-color: #9fbfaa; }
.gwall small { display: block; color: #a9c2b2; margin-top: 12px; }

/* result: the celebration card */
.gres { background: #fff; border-radius: 22px; padding: 26px 20px 20px; text-align: center; position: relative; overflow: hidden;
    box-shadow: 0 2px 0 var(--line-strong), 0 12px 30px rgba(18,53,33,.14); animation: gin .4s ease-out; }
.gres::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, #1f7a45 33.3%, #fff 33.3% 66.6%, var(--red) 66.6%); }
.gres--win { background: radial-gradient(circle at 50% 0%, #fff8e6, #fff 60%); }
.gres__lvl { display: inline-block; background: var(--green-soft); color: var(--green); font-weight: 800; border-radius: 999px; padding: 3px 12px; font-size: 14px; }
.gres__h { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 7vw, 40px); margin: 8px 0 4px; }
.gstars { display: flex; justify-content: center; gap: 8px; margin: 4px 0 8px; }
.gstar { font-size: 50px; line-height: 1; color: var(--line); }
.gstar.is-on { color: #e8b64c; text-shadow: 0 3px 0 var(--gold); animation: gstar .6s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: var(--d); }
.gstar:nth-child(2) { font-size: 62px; margin-top: -8px; }
.gres__score { font-family: var(--serif); font-size: 58px; line-height: 1; color: var(--green); }
.gres__score small { font-family: var(--sans); font-size: 18px; color: var(--ink-muted); }
.gres__line { font-size: 18px; font-weight: 600; margin-top: 6px; }
.gres__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.gres__more { margin-top: 12px; font-size: 15px; color: var(--ink-muted); }
.grev-box { margin-top: 16px; text-align: left; border-top: 1px solid var(--line); padding-top: 10px; }
.grev-box summary { cursor: pointer; font-weight: 700; color: var(--green); }
.grev { list-style: none; padding: 0; margin: 12px 0 0; text-align: left; display: grid; gap: 8px; }
.grev li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; font-size: 15px; }
.grev b { display: block; }
.grev .ok { color: #1f9d55; font-weight: 700; }
.grev .no { color: var(--red); font-weight: 700; }

/* kids: bigger targets */
.gstage--kids .gopt { min-height: 88px; font-size: 26px; }
.gstage--kids .gcardq__word { font-size: clamp(38px, 10vw, 58px); }
.gsetup--kids .gmap__dot { width: 62px; height: 62px; }

@keyframes gpop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes gin { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gshake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
@keyframes gright { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes gbump { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes gburst { 0% { transform: scale(1); } 40% { transform: scale(1.35) rotate(-4deg); } 100% { transform: scale(1); } }
@keyframes gpulse { from { box-shadow: 0 0 0 0 rgba(206,43,55,.0); } to { box-shadow: 0 0 0 4px rgba(206,43,55,.25); } }
@keyframes gfloat { 0% { opacity: 0; transform: translate(-50%, 0) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -18px) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -70px) scale(1); } }
@keyframes gstar { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes gdrain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 420px) {
    .gmap { grid-auto-rows: 84px; }
    .gmap__track { top: 24px; height: calc(84px + 6px); }
    .gmap__dot { width: 48px; height: 48px; font-size: 18px; }
    .gopt { font-size: 19px; min-height: 66px; }
    .gcount__n { font-size: 96px; }
}
@media (prefers-reduced-motion: reduce) {
    .gstage *, .gsetup * { animation: none !important; transition: none !important; }
}

/* ── forms (signup, login, account) ────────────────────────────────── */
.pform { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 560px; margin-top: 16px; }
.pf { margin-bottom: 14px; }
.pf label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.pf input[type=text], .pf input[type=email], .pf input[type=tel], .pf input[type=password], .pf input[type=number], .pf input[type=date], .pf select {
    width: 100%; min-height: 50px; border-radius: 10px; border: 1.5px solid var(--line-strong); padding: 0 12px; font: inherit; font-size: 17px; background: #fff; color: var(--ink);
}
.pf input:focus, .pf select:focus { outline: none; border-color: var(--green); }
.pf__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.pf__phone { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
.pf__hint { font-size: 14px; color: var(--ink-muted); margin-top: 4px; }
.pf__err { color: var(--red-dark); font-size: 14px; margin-top: 4px; font-weight: 600; }
.pf__pw { position: relative; }
.pf__pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.pf__check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.pf__check input { margin-top: 4px; width: 20px; height: 20px; flex: none; }
.pkid { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 8px; margin-bottom: 8px; }
.pcode { letter-spacing: .5em; text-align: center; font-size: 28px !important; font-weight: 700; }
.palert { border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-weight: 600; }
.palert--ok { background: #e3f4e8; color: #14532d; }
.palert--err { background: var(--red-soft); color: var(--red-dark); }
.palert--dev { background: var(--gold-soft); color: var(--gold-ink); }
.pmore { margin-top: 14px; font-size: 15px; display: grid; gap: 6px; }

.pplayers { display: grid; gap: 10px; margin-top: 12px; }
.pplayer { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.pplayer.is-current { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.pplayer__n { font-weight: 700; }
.pplayer__s { font-size: 14px; color: var(--ink-muted); }
.pplayer__acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pplayer__acts form { margin: 0; }
.pclass { background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: var(--radius); padding: 18px; margin-top: 20px; }
.pclass h2 { font-size: 22px; margin: 0 0 6px; }

/* ── homepage "Learn for free" band ────────────────────────────────── */
.freeband { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 760px) { .freeband { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.fcard { background: #fff; border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: 52px minmax(0, 1fr) 20px; gap: 14px; align-items: center; color: var(--ink); box-shadow: 0 1px 2px rgba(18,53,33,.06), 0 6px 18px rgba(18,53,33,.10); }
.fcard:hover { color: var(--ink); transform: translateY(-1px); }
.fcard__ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; }
.fcard__t { display: block; font-weight: 700; font-size: 19px; }
.fcard__s { display: block; font-size: 15px; color: var(--ink-soft); }
@media (min-width: 760px) {
    .fcard { display: flex; flex-direction: column; align-items: flex-start; padding: 24px; gap: 10px; }
    .fcard__t { font-family: var(--serif); font-weight: 400; font-size: 26px; }
    .fcard__chev { display: none; }
}

.glevel-msg { margin: 10px auto 4px; padding: 10px 14px; border-radius: 12px; background: #f6f6f3; color: var(--ink-soft); font-weight: 600; max-width: 520px; }
.glevel-msg--ok { background: var(--green-soft); color: var(--green); }
/* A guest's end screen: sign up to keep the points (otherwise level 1 again). */
.gsave { margin: 14px auto 6px; padding: 16px 18px; border-radius: 16px; max-width: 520px; background: #fff7e8; border: 2px dashed #e0a526; color: var(--ink); }
.gsave b { display: block; font-size: 1.25rem; margin-bottom: 4px; }
.gsave p { margin: 0 0 12px; color: var(--ink-soft); }
.gsave__btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* Signup: adult / under-18 tabs, city picker, declarations (docs/italian-week.md → Signup) */
.pcity { position: relative; }
.pcity__list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; margin: 4px 0 0; padding: 4px 0; list-style: none; max-height: 240px; overflow-y: auto; box-shadow: 0 6px 18px rgba(18,53,33,.12); }
.pcity__list li { padding: 10px 12px; cursor: pointer; }
.pcity__list li[aria-selected="true"], .pcity__list li:hover { background: var(--green-soft); }
.pfieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 4px; margin: 0 0 16px; }
.pfieldset legend { font-weight: 700; padding: 0 6px; }
.pnote-red { color: #b3261e; font-weight: 700; }

/* Step 2 games (2026-10-15): Vero o falso, Frase Puzzle, Indovina */
.gpic { margin: 0 auto 10px; max-width: 320px; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #f1efe9; box-shadow: inset 0 0 0 1px var(--line); }
.gpic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gcardq__word--sentence { font-family: var(--sans); font-size: clamp(22px, 5.4vw, 30px); font-weight: 700; line-height: 1.3; }
.gcardq__ask { margin-top: 10px; font-weight: 800; color: var(--gold-ink); letter-spacing: .02em; }
.gletters { color: var(--ink-muted); font-weight: 600; }
.gopts--vf .gopt { min-height: 88px; font-size: 24px; }
.gopts--vf .gopt--0 { --c: #1f9d55; --s: #14532d; }
.gopt__icon { display: block; font-size: 28px; line-height: 1; margin-bottom: 2px; }
.gtype--word input { width: 100%; min-height: 58px; border-radius: 16px; border: 2.5px solid var(--line-strong); padding: 0 16px; font: inherit; font-size: 22px; text-align: center; background: #fff; color: var(--ink); }
.gtype--word input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(27,77,46,.12); }
.gtype--word input.is-right { border-color: #1f9d55; background: #f1faf4; }
.gtype--word input.is-wrong { border-color: var(--red); background: #fff7f6; }
.gline { min-height: 64px; margin-top: 16px; padding: 10px; border-radius: 16px; background: #fff; border: 2.5px dashed var(--gold-line); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; transition: border-color .2s, background .2s; }
.gline.is-empty { justify-content: center; }
.gline:not(.is-empty) .gline__empty { display: none; }
.gline__empty { color: var(--ink-muted); font-size: 15px; }
.gline.is-right { border-style: solid; border-color: #1f9d55; background: #f1faf4; }
.gline.is-wrong { border-style: solid; border-color: var(--red); background: #fff7f6; animation: gshake .45s; }
.gtiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; min-height: 52px; }
.gtile { border: 0; border-radius: 12px; padding: 10px 16px; font: inherit; font-size: 20px; font-weight: 800; color: #fff; background: #2b6cb0; box-shadow: 0 4px 0 #1d4e82; cursor: pointer; transition: transform .08s; animation: gpop .3s cubic-bezier(.2, 1.6, .4, 1); }
.gtile:nth-child(3n+2) { background: #1f7a45; box-shadow: 0 4px 0 #14532d; }
.gtile:nth-child(3n+3) { background: #c9962f; box-shadow: 0 4px 0 #8a6417; }
.gline .gtile { background: var(--green-deep); box-shadow: 0 3px 0 #000; }
.gtile:active:not(:disabled) { transform: translateY(3px); }
.gtile:disabled { cursor: default; opacity: .9; }
.gtiles__row { margin-top: 14px; }
.grev__img { display: block; width: 72px; height: 54px; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }
.gstage--kids .gtile { font-size: 24px; padding: 12px 18px; }
@media (max-width: 420px) { .gtile { font-size: 18px; padding: 9px 13px; } }

/* Play together: live rooms (docs/free-games.md → Live rooms) */
.rhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.rhead__eyebrow { font-weight: 800; color: var(--red); letter-spacing: .02em; }
.rcode { background: var(--green-deep); color: #fff; border-radius: 16px; padding: 8px 18px; text-align: center; box-shadow: 0 4px 0 #000; }
.rcode__label { display: block; font-size: 12px; color: #a9c2b2; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.rcode__value { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 30px; font-weight: 800; letter-spacing: .18em; }
.rlobby { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 18px; max-width: 680px; }
.rshare { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.rshare input { min-width: 0; min-height: 46px; border-radius: 12px; border: 1.5px solid var(--line-strong); padding: 0 12px; font: inherit; font-size: 15px; color: var(--ink-soft); background: #fafaf7; }
.rjoin { margin-top: 16px; }
.rjoin__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 4px; }
.rjoin__row input { min-height: 52px; border-radius: 12px; border: 2px solid var(--line-strong); padding: 0 14px; font: inherit; font-size: 18px; }
.rjoin__row input:focus { outline: none; border-color: var(--green); }
.rlobby__h { font-size: 18px; margin: 18px 0 8px; }
.rmembers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.rmember { display: flex; align-items: center; gap: 8px; background: #f6f6f2; border-radius: 14px; padding: 8px 10px; }
.rmember.is-me { background: var(--green-soft); }
.rmember.is-new { animation: gpop .45s cubic-bezier(.2, 1.6, .4, 1); }
.rmember.is-away { opacity: .5; }
.rmember__av { width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.rmember__n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtag { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 7px; background: var(--green); color: #fff; }
.rtag--host { background: #c9962f; }
.rstart { margin-top: 18px; }
.rwait { margin-top: 18px; padding: 14px; border-radius: 14px; background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; text-align: center; }
.rdots i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin: 0 2px; animation: rdot 1s infinite ease-in-out; }
.rdots i:nth-child(2) { animation-delay: .15s; }
.rdots i:nth-child(3) { animation-delay: .3s; }
.rrace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.rrace .gstage { margin: 0; max-width: none; }
.rboard { background: #fff; border-radius: 22px; padding: 14px; box-shadow: 0 2px 0 var(--line-strong), 0 10px 28px rgba(18,53,33,.10); position: sticky; top: 90px; }
.rboard__h { font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.rlive { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: gpulse .8s infinite alternate; box-shadow: 0 0 0 0 rgba(206,43,55,.3); }
.rrows { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 12px; transition: background .3s; }
.rrow.is-me { background: var(--green-soft); }
.rrow.is-away { opacity: .55; }
.rrow__rank { font-weight: 800; color: var(--gold); text-align: center; }
.rrow__who { min-width: 0; display: grid; gap: 2px; }
.rrow__who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow__who small { color: var(--ink-muted); font-size: 12px; }
.rrow__bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rrow__bar i { display: block; height: 100%; background: linear-gradient(90deg, #1f9d55, #2f8f55); transition: width .4s; }
.rrow__score { font-weight: 800; color: var(--green); }
.rpodium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-items: end; margin: 6px 0 10px; text-align: center; }
.rpodium__p { display: grid; justify-items: center; gap: 2px; animation: gin .5s ease-out both; }
.rpodium__p b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpodium__p span:not(.rmember__av) { font-size: 13px; color: var(--green); font-weight: 800; }
.rpodium__step { width: 100%; border-radius: 10px 10px 0 0; background: var(--gold-soft); font-size: 22px; padding-top: 6px; }
.rpodium__p--1 .rpodium__step { height: 70px; background: #fbe7b5; }
.rpodium__p--2 .rpodium__step { height: 50px; }
.rpodium__p--3 .rpodium__step { height: 36px; }
.rpodium__p--1 .rmember__av { background: #c9962f; width: 44px; height: 44px; }
.rwinner { text-align: center; font-weight: 800; margin: 0 0 10px; }
.rboard__actions { display: grid; gap: 8px; margin-top: 12px; }
.groom { margin-top: 10px; }
.gjoin-code { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 14px 0; }
.gjoin-code input { min-height: 44px; width: 130px; border-radius: 10px; border: 1.5px solid var(--line-strong); padding: 0 10px; font: inherit; font-size: 18px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
@keyframes rdot { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
@media (max-width: 860px) {
    .rrace { grid-template-columns: minmax(0, 1fr); }
    .rboard { position: static; }
}
@media (max-width: 520px) {
    .rshare { grid-template-columns: 1fr 1fr; }
    .rshare input { grid-column: 1 / -1; }
    .rcode__value { font-size: 24px; }
}
.rmember__n { flex: 1; min-width: 0; }
.rmember .rtag { flex: none; }
.gstart:disabled { opacity: .45; cursor: not-allowed; box-shadow: 0 2px 0 var(--red-dark); }

/* Weekly mini-league + streak (docs/free-games.md → League and streak) */
.lstreak { background: linear-gradient(135deg, #fff4e6, #fff); border: 1px solid #f6d7b0; border-radius: 22px; padding: 16px 18px; margin: 10px 0 18px; display: grid; gap: 8px; max-width: 680px; }
.lstreak__big { display: flex; align-items: baseline; gap: 8px; }
.lstreak__flame { font-size: 30px; }
.lstreak__big b { font-family: var(--serif); font-size: 44px; line-height: 1; color: #c2410c; }
.lstreak__big span:last-child { font-weight: 700; color: #9a3412; }
.lstreak__days { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; max-width: 420px; }
.lstreak__days i { height: 14px; border-radius: 4px; background: #f1e3d3; }
.lstreak__days i.on { background: #f97316; }
.lstreak__note { color: var(--ink-soft); font-size: 15px; }
.lboards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.lboard { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 14px; }
.lboard.is-mine { border-color: var(--green); box-shadow: 0 0 0 3px rgba(27,77,46,.08); }
.lboard__h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.lboard__h span { color: var(--ink-muted); font-size: 13px; }
.lrows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lrow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 12px; }
.lrow.is-me { background: var(--green-soft); }
.lrow--empty { display: block; color: var(--ink-muted); text-align: center; }
.lrow__rank { text-align: center; font-weight: 800; color: var(--gold); }
.lrow__n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow__g { color: var(--ink-muted); font-size: 12px; }
.lrow__p { font-weight: 800; color: var(--green); }
.lchamps { display: flex; flex-wrap: wrap; gap: 8px; }
.lchamp { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.lchamp span { grid-row: span 2; font-size: 24px; }
.lchamp small { color: var(--ink-muted); }
.gstreak { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 14px 0; }
.gstreak b { color: #c2410c; }
.gstreak a { margin-left: auto; }
.gres__streak { margin-top: 8px; font-weight: 800; color: #c2410c; }

/* Frase, higher levels: some tiles are extra words to leave out. */
.gextra { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: #fff4e0; color: #8a5a00; font-weight: 600; font-size: .92rem; text-align: center; }

/* Points chip, top right of every games page (owner request 2026-10-18; _points.blade.php) */
/* Below the header AND the Italian Week strip under it (it sat on the strip, 2026-10-25). */
.ppts { position: fixed; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 140px); z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ppts__pill { display: inline-flex; align-items: center; gap: 6px; background: #10261a; color: #f5efe0; border-radius: 999px; padding: 7px 14px; font-weight: 700; box-shadow: 0 6px 18px rgba(16,38,26,.25); }
.ppts__pill:hover { color: #fff; }
.ppts__pill b { color: #e8b64c; font-size: 18px; font-variant-numeric: tabular-nums; }
/* 🏫 Class points (a signed-in student): green, beside the gold 🏆 Challenge points. */
.ppts__pill--class { background: #1e7a45; }
.ppts__pill--class b { color: #fff; }
.ppts__pill b.is-bump { animation: gbump .35s ease-out; }
.ppts__rank { background: rgba(232,182,76,.2); color: #e8b64c; border-radius: 999px; padding: 1px 8px; font-size: 13px; }
.ppts__save { background: #fff7e8; color: #8a5a00; border: 2px dashed #e0a526; border-radius: 12px; padding: 5px 12px; font-weight: 700; font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.ppts__save:hover { color: #6b4500; }
@media (max-width: 560px) { .ppts { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); right: 10px; } }
/* Above the WhatsApp / See classes bar, not on it (2026-10-20): the chip covered its WhatsApp button. */
@media (max-width: 560px) { body.has-wabar .ppts { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); } }

/* Challenge Path band on the games pages (docs/challenge-path.md) */
.cpband { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 18px 0 0; padding: 16px 18px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #1b4d2e, #10261a); box-shadow: 0 6px 0 #0b1a12; }
.cpband:hover { color: #fff; transform: translateY(-1px); }
.cpband--kids { background: linear-gradient(135deg, #6d28d9, #4c1d95); box-shadow: 0 6px 0 #2e1065; }
.cpband__flag { font-size: 34px; }
.cpband__txt { flex: 1; min-width: 220px; display: grid; gap: 2px; }
.cpband__txt b { font-size: 19px; }
.cpband__txt span { font-size: 14px; color: rgba(255,255,255,.85); }
.cpband__go { background: #e8b64c; color: #10261a; font-weight: 900; border-radius: 999px; padding: 8px 18px; }
