/* ==========================================================================
   Popular Opinion - design system (valori ripresi esattamente dal layout)
   ========================================================================== */

:root {
  --bg: #15131F;
  --surface: #221F33;
  --surface-2: #342F4D;
  --border: #5A5478;
  --ink: #F4F1EA;
  --muted: #A9A5BD;
  --muted-2: #D9D6E8;
  --dark: #15131F;
  --dark-soft: #4A4568;
  --accent: #D7F75B;
  --fatto: #2F5BEA;
  --fatto-bar: #6F93FF;
  --opinione: #FF8A3D;
  --neg: #FF7A6B;
  --display: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --page-x: max(20px, env(safe-area-inset-top));
  --page-r: max(20px, env(safe-area-inset-right));
  --page-b: max(20px, env(safe-area-inset-bottom));
  --page-l: max(20px, env(safe-area-inset-left));
}

*,
*::before,
*::after { box-sizing: border-box; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.4 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
  overflow-wrap: break-word;
}

a { color: inherit; }

button { font-family: inherit; cursor: pointer; }

input { font-family: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

button:focus-visible { outline-offset: 2px; }

button:disabled { cursor: not-allowed; }

/* ---------------------------------------------------------------- struttura */

.page {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--page-x) var(--page-r) var(--page-b) var(--page-l);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, sans-serif;
}

.page--top { justify-content: center; }

.wrap {
  width: 100%;
  max-width: 640px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.wrap--820 { max-width: 820px; }
.wrap--560 { max-width: 560px; }

.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.wrap-flex { display: flex; flex-wrap: wrap; }

.gap-2 { gap: 2px; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-14 { gap: 14px; }
.gap-16 { gap: 16px; }
.gap-18 { gap: 18px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

.grow { flex: 1; }
.basis-300 { flex: 1 1 300px; min-width: 0; }
.basis-320 { flex: 1 1 320px; min-width: 0; }
.mt-auto { margin-top: auto; }
.center { text-align: center; }

/* ------------------------------------------------------------------ topbar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}

.topbar--tall { min-height: 44px; }

.pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
}

.pill--flat { padding: 8px 12px; }

.text-muted { color: var(--muted); font-size: 14px; }
.text-accent { color: var(--accent); font-size: 14px; font-weight: 700; }

.icon-btn {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  background: transparent;
  text-decoration: none;
}

.icon-btn--ink { color: var(--ink); }

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-right: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  background: transparent;
  border: 0;
}

/* --------------------------------------------------------------- tipografia */

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.display--64 { font-size: 64px; line-height: 0.9; }
.display--60 { font-size: 60px; line-height: 0.9; }
.display--52 { font-size: 52px; }
.display--48 { font-size: 48px; }
.display--44 { font-size: 44px; line-height: 1.02; letter-spacing: -0.02em; }
.display--40 { font-size: 40px; line-height: 1.02; letter-spacing: -0.02em; }
.display--36 { font-size: 36px; line-height: 1.05; letter-spacing: -0.02em; }
.display--32 { font-size: 32px; letter-spacing: -0.02em; }
.display--30 { font-size: 30px; letter-spacing: -0.02em; }
.display--56 { font-size: 56px; }
.display--54 { font-size: 54px; letter-spacing: -0.03em; line-height: 1; }
.display--22 { font-size: 22px; }
.display--20 { font-size: 20px; }

.lede {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  color: var(--muted);
  text-wrap: pretty;
}

.lede--s { font-size: 16px; }
.lede--xs { font-size: 15px; }
.pretty { text-wrap: pretty; }
.balance { text-wrap: balance; }

.code-text {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
}

/* --------------------------------------------------------------- controlli */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  color: var(--dark);
  background: var(--accent);
}

.btn--sm { height: 52px; }
.btn--xs { height: 44px; border-radius: 14px; font-size: 15px; }

.btn--outline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  height: auto;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.btn--ghost {
  height: auto;
  min-height: 44px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.btn--dark {
  background: var(--dark);
  color: var(--ink);
}

.btn[disabled],
.btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  background: transparent;
  border: 0;
}

.field { display: flex; flex-direction: column; gap: 8px; }

.label { font-size: 14px; font-weight: 700; }

.input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
}

.input--code {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.input::placeholder { color: var(--muted); opacity: 1; }

.input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------ pannelli/card */

.panel {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: var(--surface);
  padding: 16px;
}

.panel--pad18 { padding: 18px; }
.panel--pad20 { padding: 20px; }
.panel--radius28 { border-radius: 28px; }
.panel--tight { padding: 8px 8px 8px 16px; }
.panel--note { padding: 16px; border-radius: 20px; font-size: 15px; line-height: 1.45; color: var(--muted-2); }
.panel--inner { background: var(--bg); border-radius: 14px; }

.label-cap {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.light-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 24px;
  border-radius: 28px;
  background: var(--ink);
  color: var(--dark);
}

.light-card--tight { padding: 24px; gap: 16px; min-height: 240px; }
.light-card--tall { min-height: 340px; }
.light-card--vote { padding: 24px; gap: 16px; min-height: 260px; }
.vote-wrap { display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; }
.vote-col { min-width: 0; }

/* Tablet e schermi larghi: frase a sinistra, voti a destra (come nel layout) */
@media (min-width: 700px) {
  .vote-wrap { flex-direction: row; align-items: flex-start; flex: 0 0 auto; }
  .vote-wrap > * { flex: 1 1 0; min-width: 0; }
  .light-card--vote { min-height: 320px; }
}
.light-card--xl { min-height: 380px; gap: 24px; }

.light-tag {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--dark);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.light-note { font-size: 15px; line-height: 1.4; color: var(--dark-soft); }

.divider-dark { padding-top: 16px; border-top: 1.5px solid var(--dark); }

.leader-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: 28px;
  background: var(--accent);
  color: var(--dark);
  flex: 1 1 300px;
}

.leader-card .label-cap { color: var(--dark); }

/* Contenitore "in testa + classifica" del mockup: riga che manda a capo,
   allineata in alto così la card del primo posto non si stira in altezza. */
.rank-split {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

/* ------------------------------------------------------------------- gioco */

.col-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vote-btn {
  height: 148px;
  padding: 16px;
  border-radius: 24px;
  border: 3px solid transparent;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  color: #FFFFFF;
  background: var(--fatto);
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.vote-btn--sm { height: 132px; padding: 14px; }
.vote-btn--opinione { background: var(--opinione); color: var(--dark); }
.vote-btn[disabled] { cursor: not-allowed; }
.vote-btn.is-picked { border-color: var(--accent); }
.vote-btn.is-dimmed { opacity: 0.45; }

.vote-btn__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.vote-btn__label {
  font-family: var(--display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.02em;
}

.vote-btn--sm .vote-btn__label { font-size: 30px; }

.badge-picked {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--dark);
  font-size: 12px;
  font-weight: 700;
}

.badge-picked--dark { background: var(--dark); color: var(--accent); }

.avatar {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: var(--dark);
}

.avatar--sm { width: 32px; height: 32px; font-size: 14px; }
.avatar--xs { width: 30px; height: 30px; font-size: 14px; }

.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 12px;
  background: var(--surface);
  border-radius: 16px;
}

.player-row--off { opacity: 0.5; }
.player-row__name { flex: 1; font-size: 16px; font-weight: 500; }
.host-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 16px 0 12px;
  border-radius: 16px;
  background: var(--surface);
}

.rank-row__num {
  width: 28px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  color: var(--muted);
}

.rank-row__name { flex: 1; font-size: 16px; font-weight: 500; }
.rank-row__pts { font-size: 15px; font-weight: 700; }

.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-row__label { width: 76px; font-size: 14px; font-weight: 700; }
.bar-row__track {
  flex: 1;
  height: 14px;
  border-radius: 7px;
  background: var(--surface-2);
  overflow: hidden;
}
.bar-row__fill { height: 100%; border-radius: 7px; }
.bar-row__fill--fatto { background: var(--fatto-bar); }
.bar-row__fill--opinione { background: var(--opinione); }
.bar-row__count { width: 20px; text-align: right; font-size: 16px; font-weight: 700; }

.maj-pill {
  padding: 4px 22px 8px;
  border-radius: 22px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 54px;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--fatto);
  color: #FFFFFF;
}

.maj-pill--opinione { background: var(--opinione); color: var(--dark); }

.result-banner {
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 700;
  background: var(--accent);
  color: var(--dark);
}

.result-banner--neutral { background: var(--surface); color: var(--ink); }
.result-banner--neg { background: var(--surface-2); color: var(--neg); }

.coin-panel {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.table-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 4px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.table-head__name { flex: 1; }
.table-head__vote { width: 86px; }
.table-head__num { width: 44px; text-align: right; }

.qty-option__desc { font-size: 13px; line-height: 1.35; color: var(--muted); }

.table-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 12px 0 8px;
  border-radius: 14px;
  background: var(--surface);
}

.table-row__name { flex: 1; font-size: 15px; font-weight: 500; }
.table-row__vote { width: 86px; }
.table-row__num { width: 44px; text-align: right; font-size: 14px; font-weight: 700; }
.table-row__total { width: 44px; text-align: right; font-size: 15px; font-weight: 700; }
.pos { color: var(--accent); }
.zero { color: var(--muted); }
.neg { color: var(--neg); }

.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--fatto);
  color: #FFFFFF;
}

.chip--opinione { background: var(--opinione); color: var(--dark); }
.chip--none { background: var(--surface-2); color: var(--muted); }

/* --------------------------------------------------------------- QR / link */

.qr-box {
  align-self: center;
  padding: 14px;
  border-radius: 20px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 212px;
  height: 212px;
}

.qr-box img,
.qr-box svg { width: 184px; height: 184px; display: block; }

.invite-link {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--bg);
  font-size: 16px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.qty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 10px;
}

.qty-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 96px;
  padding: 14px;
  border-radius: 18px;
  background: var(--bg);
  color: var(--ink);
  text-align: left;
  border: 3px solid transparent;
}

.qty-option.is-on { border-color: var(--accent); }

.qty-option__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
}

/* ------------------------------------------------------------- regolamento */

.rule-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
}

.rule-num {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--dark);
  font-weight: 800;
  font-size: 15px;
}

.rule-text { font-size: 16px; line-height: 1.45; text-wrap: pretty; }

/* --------------------------------------------------------------- obiettivi */

.obj-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface);
}

.obj-row__body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.obj-row__name { font-size: 15px; font-weight: 700; }
.obj-row__text { font-size: 13px; line-height: 1.35; color: var(--muted); }
.obj-row__pts { font-size: 15px; font-weight: 700; white-space: nowrap; }

/* ---------------------------------------------------------------- feedback */

.notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  border-radius: 24px;
  background: var(--surface);
  text-align: center;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--surface-2);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-text { font-size: 14px; font-weight: 700; color: var(--neg); }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--dark);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: var(--neg); color: var(--dark); }

.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--neg);
  color: var(--dark);
  z-index: 60;
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .vote-btn { transition: none; }
  .spinner { animation-duration: 2s; }
}

/* ---------------------------------------------------- dettagli per schermata */

/* Accesso: due colonne affiancate quando c'è spazio, impilate sul telefono.
   La direzione ROW è essenziale: i figli usano flex:1 1 300px e in colonna
   quel 300px diventerebbe un'altezza, stirando la card a tutto schermo. */
.wrap--accesso {
  max-width: 820px;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 32px;
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border-radius: 28px;
  background: var(--surface);
  max-width: 100%;
}

.stack.centered { align-items: center; }

.note-small { font-size: 13px; color: var(--muted); }

.lobby-holder {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 24px;
  min-height: 0;
}

.lobby-help { position: absolute; top: 0; right: 0; z-index: 1; }
.lobby-head { padding-top: 8px; }

.quote {
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
  text-wrap: pretty;
}

.rank-lead { font-size: 17px; font-weight: 700; }

.obj-open {
  padding: 0 8px 8px 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--accent);
}

.obj-desc { font-size: 18px; line-height: 1.4; text-wrap: pretty; }
.obj-pts { font-size: 18px; font-weight: 700; }

/* ==========================================================================
   Smartphone: niente scorrimento orizzontale, input leggibili, testi scalati.
   In fondo al file così queste regole vincono su quelle di base.
   ========================================================================== */

html,
body { max-width: 100%; overflow-x: hidden; }

/* Le utility di allineamento devono vincere sui contenitori che forzano la
   colonna (.panel, .stack): senza questo, .panel.between impila invece di
   affiancare (es. card "Codice stanza" nella lobby). */
.row,
.between { flex-direction: row; }

/* Chrome/Safari riempiono di chiaro i campi compilati automaticamente */
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  box-shadow: 0 0 0 1000px var(--bg) inset;
  caret-color: var(--ink);
  transition: background-color 9999s ease-out 0s;
}

@media (max-width: 430px) {
  .page {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .wrap--accesso { gap: 24px; }
  .form-card { padding: 16px; gap: 14px; }
  .input { height: 52px; }

  .display--64 { font-size: 52px; }
  .display--60 { font-size: 48px; }
  .display--56 { font-size: 42px; }
  .display--54 { font-size: 42px; }
  .display--52 { font-size: 40px; }
  .display--48 { font-size: 38px; }
  .display--44 { font-size: 34px; }
  .display--40 { font-size: 32px; }
  .display--36 { font-size: 30px; }
  .display--32 { font-size: 27px; }
  .maj-pill { font-size: 42px; padding: 4px 18px 8px; }

  .btn { height: 52px; font-size: 16px; }
  .light-card { padding: 22px 18px; gap: 16px; }
  .light-card--tight { min-height: 210px; }
  .light-card--vote { min-height: 210px; padding: 22px 18px; }

  .vote-btn { height: 132px; padding: 14px; }
  .vote-btn--sm { height: 124px; }
  .vote-btn__label,
  .vote-btn--sm .vote-btn__label { font-size: 25px; }

  .panel--pad18 { padding: 14px; }
  .player-row,
  .rank-row { height: 48px; }
  .rule-row { padding: 14px; gap: 12px; }
  .rule-text { font-size: 15px; }

  .table-head {
    font-size: 10px;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }
  .table-head__vote,
  .table-row__vote { width: 70px; }
  .table-head__num,
  .table-row__num,
  .table-row__total { width: 46px; }
  .bar-row__label { width: 64px; }

  .qr-box { width: 186px; height: 186px; }
  .qr-box img,
  .qr-box svg { width: 158px; height: 158px; }
  .invite-link { font-size: 15px; }
}

/* Telefoni stretti (iPhone SE e simili) */
@media (max-width: 360px) {
  .display--64 { font-size: 46px; }
  .display--60 { font-size: 44px; }
  .display--52 { font-size: 36px; }
  .display--48 { font-size: 34px; }
  .vote-btn__label,
  .vote-btn--sm .vote-btn__label { font-size: 22px; }
  .vote-btn { height: 120px; }
  .table-head__vote,
  .table-row__vote { width: 62px; }
  .chip { padding: 3px 8px; font-size: 11px; }
}

/* Tablet e schermi larghi: le due colonne restano affiancate */
@media (min-width: 900px) {
  .wrap--accesso { gap: 40px; }
}

/* Con due colonne affiancate il pulsante "?" (in alto a destra) finirebbe
   sopra la card del codice stanza: si riserva lo spazio in entrambe le colonne. */
@media (min-width: 700px) {
  .lobby-head,
  .lobby-col { padding-top: 56px; }
}



/* Pagina admin: elenco e gestione delle stanze */
.admin-account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-room__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-room__name {
  font-size: 19px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.admin-room .invite-link { min-height: 44px; font-size: 14px; overflow-wrap: anywhere; }

.admin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
  gap: 10px;
}

.btn--danger { color: var(--neg); border-color: var(--neg); }
