:root {
  --paper: rgba(232, 218, 190, .94);
  --ink: #241a13;
  --muted: #75624f;
  --orange: #b74225;
  --gold: #d6ac66;
  --line: rgba(70, 48, 33, .28);
  --soft: rgba(255, 243, 216, .15);

  /* Tema do app (hub e duelo): inspirado no play do chess.com. */
  --app-bg: #302e2b;
  --app-panel: #262421;
  --app-elev: #3a3735;
  --app-line: #423e3a;
  --app-text: #e9e7e3;
  --app-muted: #a8a29b;
  --app-green: #81b64c;
  --app-green-claro: #b7e08a;
  --app-red: #ca3431;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--app-bg);
  color: var(--app-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* O cenario western e exclusivo do modo solo. */
body[data-tela="solo"] {
  color: var(--ink);
  background: linear-gradient(180deg, #526c73 0%, #b27e58 43%, #5c3b29 70%, #291c16 100%);
  font-family: Georgia, "Times New Roman", serif;
  perspective: 1200px;
}

body[data-tela="solo"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 73% 21%, rgba(255, 213, 139, .9) 0 2%, rgba(255, 192, 120, .26) 7%, transparent 18%),
    linear-gradient(180deg, rgba(37, 70, 80, .55), rgba(194, 135, 91, .12) 55%, rgba(38, 24, 18, .48));
}

body[data-tela="solo"]::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

#dustCanvas, .western-sun, .landscape { display: none; }
body[data-tela="solo"] #dustCanvas,
body[data-tela="solo"] .western-sun,
body[data-tela="solo"] .landscape { display: block; }

#dustCanvas, .western-sun, .landscape {
  position: fixed;
  inset: 0;
  pointer-events: none;
  transform-style: preserve-3d;
}

#dustCanvas { z-index: 1; }
.western-sun { z-index: -1; background: radial-gradient(circle at 77% 22%, rgba(255,236,178,.78) 0 3.5%, rgba(255,226,157,.18) 9%, transparent 18%); }
.landscape { z-index: -1; overflow: hidden; }
.ground { position: absolute; left: -10%; right: -10%; bottom: -12%; height: 37%; border-radius: 50% 50% 0 0; background: #775137; box-shadow: 0 -20px 60px rgba(105, 75, 48, .24); }
.mesa { position: absolute; bottom: 27%; width: 32%; height: 16%; background: #7d6348; opacity: .38; clip-path: polygon(0 58%, 12% 58%, 17% 28%, 38% 28%, 43% 4%, 77% 4%, 83% 30%, 100% 30%, 100% 100%, 0 100%); }
.mesa-left { left: -7%; }
.mesa-right { right: -12%; bottom: 31%; transform: scale(.75); }

button, a { font: inherit; }
button { cursor: pointer; }

.game-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
  transition: transform .12s ease-out;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}
.icon-button:hover, .icon-button:focus-visible { background: var(--soft); }
.icon-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-button[aria-pressed="true"] { color: var(--orange); }

.game-card {
  position: relative;
  margin-top: 24px;
  padding: 28px clamp(18px, 4vw, 56px) 36px;
  border: 1px solid rgba(73, 48, 31, .32);
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(91, 58, 35, .035) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--paper);
  box-shadow: 0 28px 80px rgba(48, 29, 18, .28), inset 0 0 45px rgba(105, 67, 38, .12);
  backdrop-filter: blur(2px);
  transform: translateZ(18px);
  box-shadow:
    0 28px 80px rgba(48, 29, 18, .28),
    18px 22px 45px rgba(48, 29, 18, .18),
    inset 0 0 45px rgba(105, 67, 38, .12);
}

.game-card::before, .game-card::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  border-color: rgba(58, 37, 24, .45);
}
.game-card::before { left: 10px; top: 10px; border-left: 2px solid; border-top: 2px solid; }
.game-card::after { right: 10px; bottom: 10px; border-right: 2px solid; border-bottom: 2px solid; }
.status-row { display: flex; justify-content: space-between; align-items: center; }
.eyebrow, .mistakes { font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.mistakes { letter-spacing: .08em; }

.play-area {
  min-height: 330px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.hangman-wrap {
  display: grid;
  place-items: center;
  perspective: 800px;
  filter: drop-shadow(18px 24px 12px rgba(32, 20, 15, .34));
}
.hangman {
  width: min(330px, 90%);
  height: 300px;
  transform: rotateY(-8deg) rotateX(2deg);
  transform-style: preserve-3d;
}
.gallows, .figure-part, .face { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.gallows {
  filter: drop-shadow(7px 5px 0 rgba(74, 42, 28, .35));
}
.figure-part, .face { opacity: 0; }
.figure-part.visible, .face.visible { opacity: 1; animation: figure-drop .5s cubic-bezier(.2,.7,.3,1.2); }
@keyframes figure-drop {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: translateY(0); }
}

.game-card, .app-topbar { animation: arrive .7s ease-out both; }
@keyframes arrive {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.face { stroke-width: 4; }

.word-panel { text-align: center; padding-right: 4%; }
.category { margin: 0 0 30px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .22em; }
.word { min-height: 72px; display: flex; justify-content: center; gap: clamp(5px, 1vw, 12px); }
.letter-slot { width: clamp(28px, 4vw, 48px); height: 56px; border-bottom: 3px solid var(--ink); display: grid; place-items: end center; padding-bottom: 5px; font-family: Georgia, serif; font-size: clamp(28px, 4vw, 44px); font-weight: 700; text-transform: uppercase; }
.hint { min-height: 20px; margin: 22px 0 0; color: var(--orange); font-family: Georgia, serif; font-size: 17px; font-style: italic; }

.keyboard { max-width: 760px; margin: 12px auto 0; display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; }
.key {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255,255,255,.3);
  color: var(--ink);
  font-weight: 800;
  transition: transform .15s, background .15s;
}
.key:hover:not(:disabled), .key:focus-visible:not(:disabled) { transform: translateY(-2px); background: white; }
.key:disabled { cursor: default; opacity: .38; }
.key.correct { background: var(--ink); color: white; }
.key.wrong { text-decoration: line-through; }

.actions { margin-top: 28px; display: flex; justify-content: center; gap: 12px; }
.actions button, dialog button {
  min-width: 150px;
  height: 46px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
}
.hint-button { border: 1px solid var(--ink); background: transparent; }
.new-button, dialog button { border: 1px solid var(--ink); background: var(--ink); color: white; }

dialog { width: min(420px, calc(100% - 32px)); border: 0; border-radius: 6px; padding: 38px; text-align: center; background: var(--paper); color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(32,32,29,.62); }
dialog h2 { margin: 12px 0 8px; font-family: Georgia, serif; font-size: 34px; }
dialog p { margin: 0 0 24px; color: var(--muted); }
dialog button { width: 100%; }
.dialog-icon { width: 58px; height: 58px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: white; font-size: 28px; }

@media (max-width: 700px) {
  .game-shell { width: min(100% - 24px, 1120px); }
  .topbar { height: 74px; }
  .game-card { padding-top: 20px; }
  .play-area { grid-template-columns: 1fr; min-height: 0; }
  .hangman { height: 220px; }
  .word-panel { padding: 0 0 24px; }
  .category { margin-bottom: 18px; }
  .keyboard { grid-template-columns: repeat(7, 1fr); gap: 5px; }
  .key { height: 43px; }
}

@media (max-width: 420px) {
  .status-row { align-items: flex-end; }
  .eyebrow { max-width: 150px; }
  .letter-slot { width: 25px; height: 48px; }
  .keyboard { grid-template-columns: repeat(7, 1fr); }
  .actions button { min-width: 0; flex: 1; }
}

/* ======================================================================
   App: hub, sala de espera e duelo (tema escuro)
   ====================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.app {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding-bottom: 48px;
}

.view[hidden] { display: none !important; }

/* ------------------------------------------------------------- botoes */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--app-text);
  background: transparent;
  transition: transform .12s, background .12s, box-shadow .12s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--app-green); color: #1c2413; box-shadow: 0 3px 0 #5c8a34; }
.btn-primary:hover:not(:disabled) { background: #95cc5a; }
.btn-secondary { background: var(--app-elev); color: var(--app-text); }
.btn-secondary:hover:not(:disabled) { background: #4a4744; }
.btn-ghost { background: transparent; color: var(--app-text); border: 1px solid var(--app-line); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .06); }
.btn-danger-ghost { background: transparent; color: #e2726f; border: 1px solid rgba(202, 52, 49, .5); }
.btn-danger-ghost:hover:not(:disabled) { background: rgba(202, 52, 49, .12); }
.btn-whatsapp { background: #25d366; color: #0b2d19; }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 6px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }

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

.app-topbar {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--app-line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--app-text);
  text-decoration: none;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .16em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--app-green);
  color: #1c2413;
  font-family: system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
}

.app-nav { display: flex; gap: 18px; margin-right: auto; }
.nav-link {
  color: var(--app-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--app-text); }

.topbar-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-name { font-size: 14px; font-weight: 600; }
.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #4b4741;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  flex: 0 0 auto;
}
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.vazio { background: transparent; border: 1px dashed var(--app-line); }

/* --------------------------------------------------------------- hub */

.hero-card {
  position: relative;
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  padding: 42px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(129, 182, 76, .16) 0%, transparent 55%),
    linear-gradient(135deg, #38362f 0%, #2a2926 62%);
}

.hero-copy { position: relative; z-index: 1; }
.hero-copy h1 {
  margin: 16px 0 14px;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.02;
  letter-spacing: -.02em;
}
.hero-copy p {
  margin: 0 0 26px;
  max-width: 48ch;
  color: var(--app-muted);
  font-size: 15px;
  line-height: 1.6;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(129, 182, 76, .14);
  color: var(--app-green-claro);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--app-green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(129, 182, 76, 0); }
  100% { box-shadow: 0 0 0 0 rgba(129, 182, 76, 0); }
}

.hero-board { position: relative; display: grid; place-items: center; min-height: 260px; }
.hero-svg { width: min(300px, 100%); }
.hero-gallows { fill: none; stroke: #6f6a60; stroke-width: 8; stroke-linecap: round; }
.hero-part { fill: none; stroke: #c9c4ba; stroke-width: 8; stroke-linecap: round; }
.hero-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  background: #232220;
  color: var(--app-muted);
  font-size: 12px;
  box-shadow: 0 9px 22px rgba(0, 0, 0, .38);
  animation: flutuar 5s ease-in-out infinite;
}
.hero-chip-a { top: 10%; left: 0; }
.hero-chip-b { bottom: 8%; right: 0; animation-delay: 1.2s; }
.hero-avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--app-green);
  color: #1c2413;
  font-size: 9px;
  font-weight: 800;
}
.hero-avatar.rival { background: var(--app-red); color: #fff; }
@keyframes flutuar {
  50% { transform: translateY(-6px); }
}

.hub-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.panel {
  padding: 22px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: var(--app-panel);
}
.panel-wide { grid-column: 1 / -1; }
.panel h2 { margin: 0 0 6px; font-size: 17px; }
.panel-desc { margin: 0 0 16px; color: var(--app-muted); font-size: 13px; line-height: 1.5; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-head h2 { margin: 0 0 6px; }
.panel-msg { min-height: 18px; margin: 10px 0 0; color: var(--app-muted); font-size: 12px; }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 16px;
  padding: 5px;
  border-radius: 9px;
  background: #1f1e1c;
}
.segmented button {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 700;
}
.segmented button small { font-size: 11px; font-weight: 500; opacity: .8; }
.segmented button[aria-checked="true"] {
  background: var(--app-elev);
  color: #fff;
  box-shadow: inset 0 0 0 1px #4c4945;
}

.codigo-input {
  width: 100%;
  height: 52px;
  margin-bottom: 10px;
  padding: 0 .35em 0 0;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: #1f1e1c;
  color: #fff;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .35em;
  text-transform: uppercase;
}
.codigo-input:focus-visible { outline: 2px solid var(--app-green); outline-offset: 2px; }

.sala-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sala-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #3b3834;
  border-radius: 9px;
  background: #2c2a27;
}
.sala-info { display: flex; flex-direction: column; gap: 2px; }
.sala-info span { color: var(--app-muted); font-size: 12px; }
.sala-empty {
  padding: 16px;
  border: 1px dashed var(--app-line);
  border-radius: 9px;
  color: var(--app-muted);
  font-size: 13px;
  text-align: center;
}

.como-funciona {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.como-funciona div {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
}
.como-funciona span {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(129, 182, 76, .18);
  color: var(--app-green-claro);
  font-size: 13px;
  font-weight: 800;
}
.como-funciona p { margin: 0; color: var(--app-muted); font-size: 13px; line-height: 1.5; }

/* ---------------------------------------------------- sala de espera */

.sala-card {
  max-width: 720px;
  margin: 34px auto;
  padding: 34px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: var(--app-panel);
  text-align: center;
}
.sala-card h1 { margin: 16px 0 8px; font-size: clamp(26px, 4vw, 34px); letter-spacing: -.01em; }
.sala-sub { margin: 0 auto 26px; max-width: 54ch; color: var(--app-muted); font-size: 14px; line-height: 1.55; }

.codigo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  border: 1px dashed #4c4945;
  border-radius: 12px;
  background: #232220;
}
.codigo-label { color: var(--app-muted); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.codigo-valor {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(30px, 6vw, 42px);
  letter-spacing: .28em;
  padding-left: .28em;
  color: #fff;
}

.share-row { display: flex; gap: 8px; margin-top: 14px; }
.share-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--app-line);
  border-radius: 6px;
  background: #1f1e1c;
  color: var(--app-muted);
  font-size: 13px;
}

.jogadores-slots {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 28px 0;
}
.jogador-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  border: 1px solid #3b3834;
  border-radius: 12px;
  background: #2c2a27;
}
.jogador-slot.vazio { border-style: dashed; color: var(--app-muted); }
.vs-badge { color: var(--app-muted); font-size: 13px; font-weight: 900; }
.slot-status { color: var(--app-muted); font-size: 12px; }
.sala-actions { display: flex; justify-content: center; }

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .18);
  border-top-color: var(--app-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------- duelo */

.duelo-topo {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}
.duelo-jogador {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  background: var(--app-panel);
}
.duelo-jogador-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.duelo-jogador-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duelo-acertos { margin-left: auto; color: var(--app-muted); font-size: 12px; white-space: nowrap; }
.erros-pips { display: flex; gap: 4px; }
.pip { width: 9px; height: 9px; border-radius: 50%; background: #4a4743; }
.pip-cheio { background: var(--app-red); }

.duelo-centro { display: flex; flex-direction: column; gap: 3px; text-align: center; }
.duelo-status { color: var(--app-green-claro); font-size: 14px; font-weight: 800; }
.duelo-codigo { color: var(--app-muted); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }

.duelo-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(230px, .6fr);
  gap: 18px;
  align-items: start;
}
.duelo-board {
  padding: 22px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: var(--app-panel);
}
.duelo-play { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 10px; }
.duelo-board .hangman-wrap { filter: none; }
.duelo-board .hangman { width: 100%; max-width: 260px; height: 240px; }
.duelo-board .gallows { stroke: #8a847a; filter: none; }

.duel-part {
  fill: none;
  stroke: #cfc9bd;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}
.duel-part.visible { opacity: 1; animation: figure-drop .5s cubic-bezier(.2, .7, .3, 1.2); }

.duelo-board .category { color: var(--app-muted); }
.duelo-board .word { flex-wrap: wrap; }
.duelo-board .letter-slot {
  width: clamp(20px, 3vw, 40px);
  height: 50px;
  border-bottom-color: #cfc9bd;
  color: #fff;
  font-size: clamp(22px, 3vw, 36px);
}
.duelo-board .hint { color: #e0a96d; }

.duelo-board .keyboard { max-width: 100%; margin-top: 16px; }
.duelo-board .letra-btn {
  height: 46px;
  border: 1px solid #45413c;
  border-radius: 6px;
  background: #34312e;
  color: #fff;
  font-weight: 800;
  transition: background .12s, transform .12s;
}
.duelo-board .letra-btn:hover:not(:disabled) { background: #413d39; transform: translateY(-2px); }
.duelo-board .letra-btn:disabled { cursor: default; opacity: .45; }
.duelo-board .letra-btn.certa { background: #3f6b28; border-color: #4f8332; opacity: 1; }
.duelo-board .letra-btn.errada { text-decoration: line-through; opacity: .35; }

.mistakes-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  color: var(--app-muted);
  font-size: 12px;
}
.mistakes-row .mistakes { color: #e9e7e3; }

.duelo-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: var(--app-panel);
}
.duelo-side h2 {
  margin: 0;
  color: var(--app-muted);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.emotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.emotes button {
  height: 44px;
  border: 1px solid #45413c;
  border-radius: 8px;
  background: #34312e;
  font-size: 20px;
  transition: transform .12s, background .12s;
}
.emotes button:hover { background: #413d39; transform: translateY(-2px); }
.eventos { display: flex; flex-direction: column; gap: 6px; min-height: 70px; }
.evento {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 6px;
  background: #2c2a27;
  color: var(--app-muted);
  font-size: 12px;
}
.evento-emoji { font-size: 17px; }
.evento.novo { animation: pop .35s ease-out; }
@keyframes pop {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}
.side-rodape { margin-top: auto; padding-top: 8px; }

/* ------------------------------------------------------------- dialogos */

.duelo-dialogo {
  border: 1px solid var(--app-line);
  background: var(--app-panel);
  color: var(--app-text);
}
.duelo-dialogo h2 { color: var(--app-text); font-family: inherit; }
.duelo-dialogo p { color: var(--app-muted); line-height: 1.55; }
.dialog-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-acoes .btn { width: 100%; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translateX(-50%);
  padding: 12px 18px;
  border: 1px solid var(--app-line);
  border-radius: 9px;
  background: #1f1e1c;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}
.toast[hidden] { display: none; }

/* --------------------------------------------------------------- solo */

#view-solo { padding-top: 14px; }
.solo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
#view-solo .game-card { margin-top: 8px; }
body[data-tela="solo"] .btn-ghost { color: var(--ink); border-color: var(--line); }
body[data-tela="solo"] .btn-ghost:hover { background: var(--soft); }

/* ------------------------------------------------------------- responsivo */

@media (max-width: 900px) {
  .hero-card { grid-template-columns: 1fr; padding: 30px; }
  .hero-board { order: -1; min-height: 200px; }
  .hero-svg { width: 220px; }
  .hub-grid { grid-template-columns: 1fr; }
  .como-funciona { grid-template-columns: 1fr; }
  .duelo-grid { grid-template-columns: 1fr; }
  .duelo-topo { grid-template-columns: 1fr 1fr; }
  .duelo-centro { grid-column: 1 / -1; order: -1; }
}

@media (max-width: 620px) {
  .app { width: calc(100% - 24px); }
  .app-topbar { height: 60px; gap: 10px; }
  .brand-name { display: none; }
  .user-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero-card { padding: 22px; }
  .hero-copy h1 { font-size: 34px; }
  .duelo-play { grid-template-columns: 1fr; }
  .duelo-board .hangman { height: 190px; }
  .duelo-board .keyboard { grid-template-columns: repeat(7, 1fr); }
  .jogadores-slots { grid-template-columns: 1fr; }
  .vs-badge { display: none; }
  .sala-card { padding: 22px; margin-top: 18px; }
  .share-row { flex-wrap: wrap; }
  .share-input { flex-basis: 100%; }
  .dialog-acoes { grid-template-columns: 1fr; }
}

