/* KIKKY CROSS — HUD di gara, comandi touch, stanza online, risultati */
#cx-hud { position: fixed; inset: 0; pointer-events: none; z-index: 4; font-variant-numeric: tabular-nums; }
.cx-pos { position: absolute; top: calc(10px + var(--sat)); left: calc(14px + var(--sal)); display: flex; align-items: baseline; gap: 2px; text-shadow: 0 3px 10px rgba(0, 0, 0, .55); }
.cx-pos b { font-family: var(--display); font-size: clamp(44px, 9vmin, 72px); line-height: 1; color: var(--ink); }
.cx-pos small { font-weight: 800; font-size: 18px; color: var(--ink-2); }
.cx-top { position: absolute; top: calc(78px + var(--sat)); left: calc(14px + var(--sal)); margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 13px; font-weight: 700; }
.cx-top li { display: flex; gap: 8px; align-items: center; padding: 3px 10px 3px 4px; border-radius: 8px; background: rgba(14, 10, 31, .55); max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-top li span { width: 20px; text-align: center; color: var(--ink-2); }
.cx-top li.io { background: rgba(255, 95, 162, .85); color: #1a0716; } .cx-top li.io span { color: #1a0716; }
.cx-top li.oro { color: var(--oro); }
.cx-centro { position: absolute; top: calc(12px + var(--sat)); left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.cx-centro span:first-child { font-family: var(--display); font-size: 20px; }
.cx-centro span:last-child { font-weight: 800; color: var(--ink-2); }
#cx-mappa { position: absolute; top: calc(64px + var(--sat)); right: calc(12px + var(--sar)); width: clamp(96px, 20vmin, 150px); height: auto; aspect-ratio: 1; border-radius: 14px; background: rgba(14, 10, 31, .35); }
.cx-vel { position: absolute; bottom: calc(14px + var(--sab)); left: 50%; transform: translateX(-50%); display: grid; justify-items: center; text-shadow: 0 3px 10px rgba(0, 0, 0, .6); }
.cx-vel b { font-family: var(--display); font-size: clamp(34px, 7vmin, 52px); line-height: 1; }
.cx-vel small { font-weight: 800; color: var(--ink-2); margin-top: -2px; }
.cx-nitro { width: clamp(120px, 24vw, 220px); height: 9px; border-radius: 5px; background: rgba(255, 255, 255, .18); margin-top: 6px; overflow: hidden; }
.cx-nitro i { display: block; height: 100%; width: 100%; transform-origin: left; background: linear-gradient(90deg, #3a7bff, #38d6ff); transition: transform .1s linear; }
.cx-nitro i.pronto { background: linear-gradient(90deg, #ff5fa2, #ffd23f); }

#cx-comandi { position: fixed; inset: auto 0 0 0; z-index: 4; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 calc(14px + var(--sar)) calc(14px + var(--sab)) calc(14px + var(--sal)); pointer-events: none; }
#cx-comandi button { pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 50%; background: rgba(14, 10, 31, .5); border: 2px solid rgba(255, 255, 255, .35); color: #fff; font-weight: 900; transition: transform .08s, background .1s; }
#cx-comandi button.giu { transform: scale(.92); background: rgba(255, 95, 162, .6); }
.cx-sx { display: flex; gap: 14px; }
.cx-sx button { width: clamp(70px, 15vmin, 96px); height: clamp(70px, 15vmin, 96px); font-size: 30px; }
.cx-dx { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; gap: 10px; align-items: end; }
.cx-dx .trick { width: clamp(76px, 16vmin, 104px); height: clamp(76px, 16vmin, 104px); font-size: 15px; grid-column: 2; grid-row: 1 / 3; background: rgba(255, 210, 63, .35); border-color: var(--oro); }
.cx-dx .turbo { width: 66px; height: 66px; font-size: 12px; grid-column: 1; grid-row: 1; background: rgba(58, 123, 255, .4); border-color: #38d6ff; }
.cx-dx .freno { width: 66px; height: 66px; font-size: 11px; grid-column: 1; grid-row: 2; }

#cx-avviso { position: fixed; left: 50%; top: 30%; transform: translate(-50%, -50%) scale(.8); z-index: 6; font-family: var(--display); font-size: clamp(26px, 6vmin, 44px); text-shadow: 0 4px 18px rgba(0, 0, 0, .7); opacity: 0; pointer-events: none; transition: opacity .2s, transform .35s cubic-bezier(.16, 1, .3, 1); white-space: nowrap; }
#cx-avviso.su { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#cx-avviso.grande { font-size: clamp(60px, 16vmin, 130px); top: 40%; }

/* stanza online e risultati */
#cx-lobby, #cx-ris { z-index: 15; align-items: center; justify-content: flex-start; background: rgba(8, 5, 18, .72); overflow-y: auto; }
.cx-lobby-box, .cx-ris-box { width: min(880px, 100%); margin: auto; background: var(--notte-2); border: 1px solid var(--linea); border-radius: 22px; padding: 18px 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); display: grid; gap: 12px; }
.cx-ris-box { width: min(520px, 100%); text-align: center; }
.cx-lobby-box h3 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--acc); }
.cx-nota { margin: 0; color: var(--ink-2); line-height: 1.5; }
.cx-pilota { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.cx-pilota label, .cx-card label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; }
.cx-pilota input, .cx-card select, .cx-codice input { font: inherit; color: var(--ink); background: var(--notte); border: 1px solid var(--linea); border-radius: 12px; padding: 10px 12px; min-height: 46px; user-select: text; -webkit-user-select: text; }
.cx-pilota input[type=number] { width: 84px; }
.cx-colori { display: flex; gap: 6px; flex-wrap: wrap; }
.cx-col { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); }
.cx-col.su { outline: 3px solid var(--ink); outline-offset: 2px; }
.cx-due { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cx-card { background: var(--notte); border: 1px solid var(--linea); border-radius: 16px; padding: 14px; display: grid; gap: 10px; align-content: start; }
.cx-check { display: flex !important; align-items: center; gap: 8px; font-weight: 600 !important; }
.cx-check input { width: 20px; height: 20px; accent-color: var(--acc); }
.cx-codice { display: flex; gap: 8px; }
.cx-codice input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .2em; font-weight: 800; }
.cx-stanze { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 210px; overflow-y: auto; }
.cx-stanze button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: start; padding: 10px 12px; border-radius: 12px; background: var(--notte-2); border: 1px solid var(--linea); }
.cx-stanze button:hover { border-color: var(--acc); }
.cx-stanze b { font-family: var(--display); font-weight: 400; letter-spacing: .1em; color: var(--acc); }
.cx-stanze span { color: var(--ink-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-stanze em { font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; }
.cx-stanze .vuota { color: var(--ink-2); font-size: 14px; }
.cx-msg { margin: 0; min-height: 1.2em; font-weight: 700; color: var(--oro); }
.cx-codice-grande { margin: 0; font-weight: 700; color: var(--ink-2); }
.cx-codice-grande b { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 9vmin, 64px); letter-spacing: .14em; color: var(--acc); margin-inline-start: 10px; vertical-align: middle; }
.cx-fan { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.cx-fan li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--notte); font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cx-fan li i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.cx-fan li small { color: var(--ink-2); font-weight: 600; }
.cx-fan li.io { outline: 2px solid var(--acc); }
.cx-fan li.oro { color: var(--oro); } .cx-fan li.oro i { background: linear-gradient(135deg, #ffe08a, #e8b23a); }
.cx-ris-box h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(56px, 13vmin, 96px); line-height: 1; }
.cx-ris-box h2 small { font-size: .35em; color: var(--ink-2); }
.cx-ris-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 38vh; overflow-y: auto; text-align: start; font-variant-numeric: tabular-nums; }
.cx-ris-lista li { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--notte); }
.cx-ris-lista li span { color: var(--ink-2); font-weight: 800; }
.cx-ris-lista li em { font-style: normal; color: var(--ink-2); }
.cx-ris-lista li.io { outline: 2px solid var(--acc); }
.cx-ris-lista li.oro b { color: var(--oro); }
@media (max-width: 700px) { .cx-due { grid-template-columns: 1fr; } .cx-lobby-box { padding: 14px; } }
@media (max-height: 430px) { .cx-top { display: none; } .cx-lobby-box { gap: 8px; padding: 12px 16px; } }
@media (max-height: 430px) { .cx-codice-grande b { font-size: 40px; } }
