:root {
  --bg: #121214;
  --bg2: #1b1b1f;
  --card: #1f1f24;
  --line: #34343b;
  --text: #f2f2f5;
  --muted: #9a9aa6;
  --g: #538d4e;
  --y: #c9b458;
  --b: #3a3a3c;
  --key: #818384;
  --accent: #8b5cf6;
  --accent2: #ec4899;
  --danger: #ef4444;
  --radius: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
body.cb { --g: #f5793a; --y: #85c0f9; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
input {
  font: inherit; color: var(--text); background: var(--bg2);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
h2 { margin: .3em 0 .5em; font-size: 1.3rem; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

.screen { display: none; min-height: 100dvh; }
.screen.active { display: flex; flex-direction: column; }

/* ---------- elementi comuni ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
}
.card-title { font-weight: 700; margin-bottom: 10px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.narrow { max-width: 560px; margin: 24px auto; }
.lbl { font-weight: 600; margin-bottom: 8px; display: block; }

.btn {
  background: #2c2c33; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 16px; font-weight: 600; transition: transform .08s, filter .15s;
}
.btn:active { transform: scale(.97); }
.btn:hover { filter: brightness(1.15); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: 0; color: #fff; }
.btn.big { width: 100%; padding: 14px; font-size: 1.05rem; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn:disabled { opacity: .45; pointer-events: none; }
.icon-btn {
  background: #2a2a30; border: 1px solid var(--line); border-radius: 10px;
  width: 40px; height: 40px; display: grid; place-items: center; flex: none; font-size: 1.05rem;
}
.join-row { display: flex; gap: 8px; margin: 10px 0; }
.join-row input { flex: 1; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--bg2); padding: 4px; border-radius: 10px; border: 1px solid var(--line); }
.seg button { background: transparent; border: 0; border-radius: 7px; padding: 6px 10px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.seg button.on { background: #3b3b45; color: var(--text); }
.seg.small button { padding: 4px 9px; }
.seg.locked { pointer-events: none; }

.toast {
  position: fixed; left: 50%; top: 18px; transform: translate(-50%, -30px); opacity: 0;
  background: #f2f2f5; color: #111; padding: 10px 16px; border-radius: 10px; font-weight: 700;
  transition: .25s; z-index: 100; pointer-events: none; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- home ---------- */
.home-wrap { width: 100%; max-width: 460px; margin: 0 auto; padding: 28px 16px calc(28px + var(--safe-b)); }
.logo { display: flex; justify-content: center; gap: 4px; margin-top: 10px; }
.lt {
  width: 36px; height: 36px; display: grid; place-items: center; font-weight: 800; font-size: 1.25rem;
  border-radius: 6px; animation: flipIn .6s backwards;
}
.lt.g { background: var(--g); } .lt.y { background: var(--y); } .lt.b { background: var(--b); }
.lt:nth-child(2) { animation-delay: .06s } .lt:nth-child(3) { animation-delay: .12s } .lt:nth-child(4) { animation-delay: .18s }
.lt:nth-child(5) { animation-delay: .24s } .lt:nth-child(6) { animation-delay: .3s } .lt:nth-child(7) { animation-delay: .36s }
.lt:nth-child(8) { animation-delay: .42s } .lt:nth-child(9) { animation-delay: .48s }
.tagline { text-align: center; color: var(--muted); margin: 12px 0 22px; }
.name-row { display: flex; gap: 8px; }
.name-row input { flex: 1; }
.emoji-btn { font-size: 1.6rem; width: 50px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.emoji-picker { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 10px; }
.emoji-picker button { background: var(--bg2); border: 1px solid transparent; border-radius: 8px; font-size: 1.35rem; padding: 4px 0; }
.emoji-picker button.on { border-color: var(--accent); }
.join-row #code-input { text-transform: uppercase; letter-spacing: .25em; font-weight: 700; text-align: center; }
.solo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.join-banner { text-align: center; border-color: var(--accent); }
.join-banner .btn { margin-top: 10px; }
.settings-box summary { cursor: pointer; font-weight: 600; }
.check { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.db-cfg { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }

/* ---------- stanza ---------- */
.topbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line);
  background: var(--bg); position: sticky; top: 0; z-index: 20;
}
.code-chip { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: .9rem; white-space: nowrap; }
.code-chip b { letter-spacing: .12em; }
.round-info { flex: 1; min-width: 0; font-size: .9rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.round-info b { color: var(--text); }
.timer { font-weight: 800; font-variant-numeric: tabular-nums; padding: 6px 10px; border-radius: 8px; background: var(--bg2); }
.timer.low { color: #fff; background: var(--danger); animation: pulse 1s infinite; }
.conn-warn { background: #7c2d12; color: #fff; text-align: center; padding: 6px; font-size: .9rem; }

#room-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.view { display: none; flex: 1; min-height: 0; }
.view.active { display: flex; }
#v-lobby, #v-reveal, #v-final, #v-choose, #v-anagram, #v-ncc, #v-tre, #v-cah { overflow-y: auto; padding: 16px 16px calc(80px + var(--safe-b)); flex-direction: column; }

.lobby-grid { width: 100%; max-width: 1100px; margin: 0 auto; display: grid; gap: 14px; grid-template-columns: 1fr; }
.lobby-grid .card { margin: 0; }
@media (min-width: 900px) {
  .lobby-grid { grid-template-columns: 280px 1fr 280px; align-items: start; }
}
.plist { list-style: none; padding: 0; margin: 0 0 12px; }
.plist li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.plist li:last-child { border-bottom: 0; }
.plist .em { font-size: 1.3rem; }
.plist .nm { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist .off { opacity: .4; }
.tag { font-size: .72rem; padding: 2px 7px; border-radius: 99px; background: #3b3b45; color: var(--muted); font-weight: 700; }
.tag.host { background: #4c1d95; color: #ddd6fe; }
.tag.me { background: #134e4a; color: #99f6e4; }

.game-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.game-pick button {
  background: var(--bg2); border: 2px solid var(--line); border-radius: 12px; padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.game-pick button.on { border-color: var(--accent); background: #26203a; }
.game-pick .gp-ico { font-size: 1.8rem; }
.game-pick small { color: var(--muted); font-size: .78rem; text-align: center; }
.cfg { display: none; }
.cfg.on { display: block; }
.cfg-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.cfg-row > span { font-weight: 600; font-size: .95rem; }
.cfg-help { font-size: .82rem; color: var(--muted); background: var(--bg2); border-radius: 8px; padding: 8px 10px; }
#start-btn { margin-top: 14px; }
#wait-host { margin-top: 14px; }

.score-table { width: 100%; border-collapse: collapse; }
.score-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.score-table tr:last-child td { border-bottom: 0; }
.score-table .pos { width: 28px; color: var(--muted); font-weight: 700; }
.score-table .pts { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.score-table .delta { color: #4ade80; font-size: .8rem; font-weight: 700; margin-left: 4px; }

/* ---------- wordle ---------- */
#v-wordle { flex-direction: row; }
.wcenter { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 8px 8px calc(8px + var(--safe-b)); }
.wstatus { min-height: 26px; text-align: center; color: var(--muted); font-weight: 600; margin: 4px 0 6px; font-size: .95rem; }
.wstatus b { color: var(--text); }
.board { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 5px; min-height: 0; padding: 4px 0; --ts: min(58px, 13vw, 6.8dvh); }
.board[data-len="6"] { --ts: min(54px, 12vw, 6.6dvh); }
.board[data-len="7"] { --ts: min(50px, 11vw, 6.4dvh); }
.row { display: flex; gap: 5px; justify-content: center; }
.row.shake { animation: shake .4s; }
.tile {
  width: var(--ts); height: var(--ts); border: 2px solid var(--line); display: grid; place-items: center;
  font-weight: 800; font-size: calc(var(--ts) * .52); text-transform: uppercase; user-select: none;
}
.tile.filled { border-color: #5a5a62; animation: pop .1s; }
.tile.g, .tile.y, .tile.b { border-color: transparent; color: #fff; }
.tile.g { background: var(--g); } .tile.y { background: var(--y); } .tile.b { background: var(--b); }
.tile.flip { animation: flip .5s ease both; }
.row.win .tile { animation: bounce .5s ease both; }

.kbd { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 6px; margin-top: 8px; user-select: none; }
.krow { display: flex; gap: 5px; justify-content: center; }
.key {
  flex: 1; height: 54px; border: 0; border-radius: 6px; background: var(--key); color: #fff;
  font-weight: 700; text-transform: uppercase; font-size: 1rem; padding: 0; touch-action: manipulation; max-width: 46px;
}
.key.wide { flex: 1.6; max-width: 72px; font-size: .78rem; }
.key.g { background: var(--g); } .key.y { background: var(--y); } .key.b { background: var(--b); }
.key:active { filter: brightness(1.3); }
@media (max-height: 700px) { .key { height: 46px; } }

/* avversari */
.opps { flex: none; width: 230px; border-right: 1px solid var(--line); overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.opp { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.opp.done-won { border-color: var(--g); }
.opp.done-lost { border-color: #6b2b2b; }
.opp-head { display: flex; align-items: center; gap: 6px; font-size: .85rem; margin-bottom: 6px; }
.opp-head .nm { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opp-head .st { font-size: .75rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.mini { display: flex; flex-direction: column; gap: 2px; }
.mrow { display: flex; gap: 2px; }
.mt { width: 14px; height: 14px; border-radius: 2px; background: #2a2a30; }
.mt.g { background: var(--g); } .mt.y { background: var(--y); } .mt.b { background: var(--b); }
.mt.new { animation: pop .25s; }
.opps-empty { color: var(--muted); font-size: .85rem; text-align: center; padding: 10px; }
.opps-title { font-size: .75rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

@media (max-width: 760px) {
  #v-wordle { flex-direction: column; }
  .opps { width: auto; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 6px 8px; gap: 6px; }
  .opps-title { display: none; }
  .opp { padding: 5px 6px; flex: none; }
  .opp-head { font-size: .72rem; margin-bottom: 3px; max-width: 110px; }
  .mt { width: 8px; height: 8px; border-radius: 1px; }
  .mini, .mrow { gap: 1px; }
}

/* spettatore (chi ha scelto la parola) */
.spect { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 10px; }
.spect .mt { width: 26px; height: 26px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; text-transform: uppercase; color: #fff; }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.chips li { background: var(--bg2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: .85rem; }
.chips li.ok { border-color: var(--g); }

/* ---------- reveal ---------- */
.reveal-wrap { width: 100%; max-width: 900px; margin: 0 auto; }
.reveal-head { text-align: center; margin: 6px 0 16px; }
.secret { display: flex; gap: 5px; justify-content: center; margin: 8px 0; }
.secret .tile { --ts: 46px; }
.reveal-grids { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 16px; }
.rgrid { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-width: 150px; }
.rgrid .opp-head { font-size: .9rem; }
.rgrid .rw { display: flex; gap: 2px; margin-bottom: 2px; }
.rgrid .rt { width: 22px; height: 22px; display: grid; place-items: center; font-size: .75rem; font-weight: 800; text-transform: uppercase; border-radius: 3px; color: #fff; background: #2a2a30; }
.rgrid .rt.g { background: var(--g); } .rgrid .rt.y { background: var(--y); } .rgrid .rt.b { background: var(--b); }
.pts-badge { font-weight: 800; color: #4ade80; }
.pts-badge.zero { color: var(--muted); }
.host-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0 30px; }
.host-actions .btn { min-width: 180px; }

.sprint-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0 14px; }
.sprint-list span { background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-weight: 700; text-transform: uppercase; font-size: .85rem; }

/* ---------- finale ---------- */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 20px 0; }
.pod { text-align: center; width: 100px; }
.pod .em { font-size: 2.2rem; }
.pod .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .bar { border-radius: 10px 10px 0 0; margin-top: 6px; display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; }
.pod.p1 .bar { height: 120px; background: linear-gradient(#facc15, #a16207); }
.pod.p2 .bar { height: 90px; background: linear-gradient(#d4d4d8, #71717a); }
.pod.p3 .bar { height: 65px; background: linear-gradient(#fb923c, #9a3412); }
.awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 14px; }
.award { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.award .ai { font-size: 1.6rem; }
.award b { display: block; }

/* ---------- reazioni ---------- */
.react-bar {
  position: fixed; right: 10px; bottom: calc(10px + var(--safe-b)); display: flex; gap: 4px; z-index: 30;
  background: rgba(31,31,36,.92); border: 1px solid var(--line); border-radius: 99px; padding: 4px; backdrop-filter: blur(6px);
}
.react-bar button { background: transparent; border: 0; font-size: 1.25rem; width: 36px; height: 36px; border-radius: 50%; }
.react-bar button:active { transform: scale(1.3); }
#s-room.in-wordle .react-bar { bottom: auto; top: calc(64px + env(safe-area-inset-top)); right: 8px; flex-direction: column; }
@media (max-width: 760px) { #s-room.in-wordle .react-bar { top: calc(150px + env(safe-area-inset-top)); right: 4px; padding: 2px; } #s-room.in-wordle .react-bar button { width: 30px; height: 30px; font-size: 1.05rem; } }
.float-layer { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.floater { position: absolute; bottom: -60px; display: flex; flex-direction: column; align-items: center; animation: floatUp 3.2s ease-out forwards; }
.floater .fe { font-size: 2.6rem; }
.floater .fn { font-size: .75rem; font-weight: 700; background: rgba(0,0,0,.6); padding: 1px 6px; border-radius: 6px; }
.confetti { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.4s ease-in forwards; }

/* ---------- modale ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; width: 100%; max-width: 440px; max-height: 85dvh; overflow-y: auto; position: relative; }
.modal-x { position: absolute; top: 10px; right: 10px; }

.solo-main { flex: 1; display: flex; min-height: 0; }
#s-solo.active { height: 100dvh; }
#s-room.active { height: 100dvh; }
.big-emoji { font-size: 3rem; }
.spin { display: inline-block; animation: wobble 1.4s infinite; }

/* ---------- animazioni ---------- */
@keyframes pop { 0% { transform: scale(.85) } 60% { transform: scale(1.08) } 100% { transform: scale(1) } }
@keyframes flip { 0% { transform: rotateX(0) } 50% { transform: rotateX(90deg) } 100% { transform: rotateX(0) } }
@keyframes flipIn { from { transform: rotateX(90deg); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes shake { 10%,90% { transform: translateX(-2px) } 20%,80% { transform: translateX(4px) } 30%,50%,70% { transform: translateX(-7px) } 40%,60% { transform: translateX(7px) } }
@keyframes bounce { 0%,100% { transform: translateY(0) } 40% { transform: translateY(-22px) } 70% { transform: translateY(4px) } }
@keyframes pulse { 50% { opacity: .65 } }
@keyframes floatUp { 0% { transform: translateY(0) scale(.6); opacity: 0 } 10% { opacity: 1; transform: translateY(-10vh) scale(1.1) } 100% { transform: translateY(-85vh) scale(1); opacity: 0 } }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }
@keyframes wobble { 0%,100% { transform: rotate(-10deg) } 50% { transform: rotate(10deg) } }

/* ---------- anagrammi ---------- */
.ana-wrap { width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 6px; }
.ana-count { color: var(--muted); font-weight: 700; }
.ana-letters, .ana-slots { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.ana-letters button, .ana-slots div {
  width: min(56px, 12.5vw); height: min(56px, 12.5vw); border-radius: 10px; display: grid; place-items: center;
  font-weight: 800; font-size: min(1.6rem, 7vw); text-transform: uppercase; user-select: none;
}
.ana-letters button { background: var(--y); color: #fff; border: 0; box-shadow: 0 4px 0 #8a7a2c; transition: transform .08s, opacity .15s; touch-action: manipulation; }
.ana-letters button:active { transform: translateY(3px); box-shadow: 0 1px 0 #8a7a2c; }
.ana-letters button.used { opacity: .18; pointer-events: none; }
.ana-slots div { border: 2px solid var(--line); background: var(--bg2); }
.ana-slots div.full { border-color: #5a5a62; animation: pop .1s; }
.ana-slots.ok div { background: var(--g); border-color: transparent; color: #fff; }
.ana-slots.shake { animation: shake .4s; }
.ana-msg { min-height: 52px; text-align: center; font-weight: 700; font-size: 1.05rem; }
.ana-msg .big { font-size: 1.5rem; letter-spacing: .08em; text-transform: uppercase; display: block; }
.ana-btns { display: flex; gap: 8px; }
.ana-board { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ana-board span { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: .9rem; }
.ana-board span b { margin-left: 4px; }
.ana-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ana-list div { display: flex; justify-content: space-between; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.ana-list .w { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }

.solo-games { display: flex; width: 100%; margin-bottom: 8px; }
.solo-games button { flex: 1; }
#solo-best { min-height: 18px; margin-bottom: 8px; }
.solo-ana { flex: 1; overflow-y: auto; padding: 16px; }
.solo-end { text-align: center; }
.solo-end .big-num { font-size: 3rem; font-weight: 800; }

/* ---------- categorie (lobby) ---------- */
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chips button, .cat-chips .chip { background: var(--bg2); border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.cat-chips button.on { background: #26203a; border-color: var(--accent); color: var(--text); }
.cat-chips.locked { pointer-events: none; }
.cat-chips .chip { color: var(--text); border-color: var(--y); }
.cat-chips .chip button { background: none; border: 0; padding: 0 0 0 4px; color: var(--muted); }

/* ---------- nomi cose città ---------- */
.ncc-wrap { width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.ncc-big { margin: 0 auto; width: 84px; height: 84px; border-radius: 18px; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: grid; place-items: center; font-size: 3rem; font-weight: 900; color: #fff; }
.ncc-big.small-letter { width: 60px; height: 60px; font-size: 2.1rem; }
.ncc-banner { text-align: center; min-height: 22px; font-weight: 600; }
.ncc-list { display: flex; flex-direction: column; gap: 8px; }
.ncc-row { display: flex; flex-direction: column; gap: 4px; }
.ncc-row span { font-size: .85rem; font-weight: 700; color: var(--muted); }
.ncc-row input:disabled { opacity: .6; }
.ncc-cat { margin-bottom: 10px; }
.ncc-ans { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.ncc-ans:last-child { border-bottom: 0; }
.ncc-ans .txt { flex: 1; font-weight: 700; word-break: break-word; }
.ncc-ans.bad .txt { text-decoration: line-through; opacity: .55; }
.ncc-ans.unique .txt::after { content: ' ⭐'; }
.ncc-ans .vote, .ncc-ans .vote-sp { width: 52px; flex: none; }
.ncc-ans .vote { font-size: .8rem; padding: 3px 6px; border-radius: 7px; background: #2c2c33; border: 1px solid var(--line); }
.ncc-ans .vote.on { background: #7f1d1d; border-color: var(--danger); }

/* ---------- nominane 3 ---------- */
.tre-who { font-size: 1.3rem; margin-bottom: 8px; }
.tre-cat { font-size: 1.15rem; margin: 10px 0; line-height: 1.3; }
.tre-cat b { font-size: 1.7rem; }
.tre-count { font-size: 4.5rem; font-weight: 900; font-variant-numeric: tabular-nums; margin: 6px 0 14px; }
.tre-count.low { color: var(--danger); animation: pulse .5s infinite; }
.tre-go { font-size: 1.6rem; padding: 22px; margin-top: 10px; }
.tre-vote { display: flex; gap: 10px; justify-content: center; }
.tre-vote .btn { min-width: 120px; font-size: 1.1rem; padding: 14px; }

/* ---------- carte scorrette ---------- */
.cah-wrap { width: 100%; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.cah-card { border-radius: 14px; padding: 16px; font-weight: 700; line-height: 1.35; text-align: left; }
.cah-card.black { background: #000; color: #fff; border: 1px solid #333; font-size: 1.2rem; }
.cah-card.black.small { font-size: 1rem; }
.cah-card.black.win { border: 2px solid #facc15; font-size: 1.3rem; }
.cah-card .fill { color: #fde68a; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cah-card .by { margin-top: 8px; font-size: .85rem; color: #aaa; font-weight: 600; }
.cah-card.white { background: #fff; color: #111; border: 2px solid transparent; font-size: .92rem; min-height: 96px; position: relative; display: block; width: 100%; }
.cah-card.white.sel { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,.4); transform: translateY(-3px); }
.cah-card.white .num { position: absolute; top: 6px; right: 8px; background: var(--accent); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-size: .8rem; }
.cah-hand { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.cah-subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cah-card.pickable { cursor: pointer; border-color: #555; }
.cah-card.pickable:hover { border-color: #facc15; }
.cah-custom { max-width: 520px; margin: 10px auto; }

.spect-view { flex: 1; width: 100%; overflow-y: auto; }
.spect .mt.typing { background: transparent; border: 2px solid #5a5a62; color: var(--text); }
.spect .opp { padding: 10px; }
.spect .mini, .spect .mrow { gap: 3px; }
#spect-btn { margin-left: 6px; padding: 4px 10px; font-size: .82rem; }
.spect-view .spect .mt { width: min(34px, 7.4vw); height: min(34px, 7.4vw); font-size: min(1rem, 4vw); }

#ask { z-index: 70; }
.ask-box { max-width: 340px; text-align: center; }
.ask-box p { font-weight: 700; font-size: 1.05rem; margin: 6px 0 16px; }
.ask-btns { display: flex; gap: 10px; justify-content: center; }
.ask-btns .btn { flex: 1; }
