/* =====================================================================
   PROTOCOLO — interface de PC (layout fluido, tamanhos reais)
   Pensado para 1280×720 até 2560×1440. Sem ampliar telas de celular.
   ===================================================================== */
:root {
  --lime: #ff3347;
  --ok: #3aa0ff;
  --lime-dim: #c41d2f;
  --green-deep: #3d0f14;
  --ink: #04080f;
  --bg-1: #071224;
  --panel: rgba(10, 19, 33, .86);
  --panel-solid: #0b1626;
  --panel-head: rgba(255, 255, 255, .025);
  --edge: #1f3248;
  --edge-2: #2c4664;
  --text: #e6eef8;
  --text-2: #b9c8da;
  --muted: #7d92ab;
  --orange: #ffa021;
  --red: #ff4646;
  --blue: #4fb1ff;
  --gold: #ffcc33;
  --crew: #6dbdff;
  --imp: #ff6a60;
  --head: 'Saira Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', 'Segoe UI', Roboto, Arial, sans-serif;
  --marker: 'Permanent Marker', 'Saira Condensed', cursive;
  --gap: 14px;
  --radius: 10px;
  --col-left: clamp(250px, 17vw, 320px);
  --col-right: clamp(300px, 21vw, 400px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: var(--bg-1); }
body {
  font-family: var(--body); font-size: 15px; line-height: 1.4; color: var(--text);
  -webkit-font-smoothing: antialiased; overflow: auto; min-width: 1200px; min-height: 680px;
}
input, button { font-family: inherit; color: inherit; font-size: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

#viewport { position: relative; width: 100%; height: 100%; min-width: 1200px; min-height: 680px; }
#stage {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  background:
    radial-gradient(ellipse 50% 45% at 85% 15%, rgba(230, 30, 50, .16), transparent 70%),
    radial-gradient(ellipse 50% 50% at 20% 90%, rgba(40, 110, 230, .14), transparent 70%),
    linear-gradient(180deg, #05080f 0%, #04060c 60%, #020307 100%);
}
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.bg-planet {
  position: absolute; width: 70vw; height: 70vw; right: -28vw; bottom: -40vw; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 170, 160, .4), transparent 26%),
    radial-gradient(circle at 45% 45%, #e0283a 0%, #9e1324 32%, #4a0710 58%, #1a0306 75%);
  box-shadow: 0 0 140px 40px rgba(255, 40, 60, .22), inset -80px -60px 160px rgba(0, 0, 0, .7);
  opacity: .42;
}
.bg-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55)); }

.screen { position: absolute; inset: 0; display: none; }
.screen.active { display: block; animation: screenIn .4s ease both; }
@keyframes screenIn { from { opacity: 0; } }

[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; }
[data-icon] svg { width: 1em; height: 1em; }

/* ------------------------------------------------------------- painéis */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
  min-height: 0;
}
.panel-h {
  display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px; flex: none;
  font-family: var(--head); font-size: 16px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text-2); background: var(--panel-head); border-bottom: 1px solid var(--edge);
  border-radius: var(--radius) var(--radius) 0 0; white-space: nowrap;
}
.panel-h > [data-icon]:first-child { font-size: 16px; color: var(--lime); }
.ph-right { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text); }
.ph-right .signal { color: var(--lime); }
.ph-link { margin-left: auto; flex: none; font-family: var(--body); font-size: 12px; font-weight: 600; letter-spacing: .4px; color: var(--muted); text-transform: none; padding: 3px 8px; border-radius: 5px; }
.ph-link:hover { color: var(--lime); background: rgba(255, 51, 71, .08); }

/* ------------------------------------------------------------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 7px; font-family: var(--head); font-size: 16px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; border: 1px solid rgba(255, 255, 255, .14);
  transition: filter .12s, transform .12s, box-shadow .15s;
}
.btn [data-icon] { font-size: 15px; }
.btn:not(:disabled):hover { filter: brightness(1.15); }
.btn:not(:disabled):active { transform: translateY(1px); }
.btn:disabled { opacity: .45; filter: grayscale(.6); }
.btn-xl { height: 46px; font-size: 18px; padding: 0 24px; }
.btn-green { background: linear-gradient(180deg, #ff4a5a, #b3121f); color: #fff; border-color: #ff7d88; box-shadow: 0 0 16px rgba(255, 51, 71, .22); text-shadow: 0 1px 0 rgba(60, 0, 0, .5); }
.btn-red { background: linear-gradient(180deg, #f24a40, #b3181f); color: #fff; border-color: #ff7b72; }
.btn-blue { background: linear-gradient(180deg, #3f9cf5, #175fbf); color: #fff; border-color: #79bbff; }
.btn-dark { background: #12223a; color: var(--text); border-color: var(--edge-2); }
.btn-dark:not(:disabled):hover { border-color: var(--lime); }
.link-btn { color: var(--lime); font-size: 13px; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ============================================================ HOME */
#screen-home.active { display: grid; grid-template-columns: clamp(320px, 24vw, 420px) 1fr; }
.home-side {
  position: relative; z-index: 2; display: flex; flex-direction: column; padding: 34px 30px 26px;
  background: linear-gradient(90deg, rgba(4, 9, 17, .96), rgba(6, 13, 24, .88));
  border-right: 1px solid var(--edge);
  box-shadow: 10px 0 40px rgba(0, 0, 0, .45);
}
.home-logo {
  width: 100%; max-width: 330px; align-self: center;
  -webkit-mask-image: radial-gradient(ellipse 62% 66% at 50% 50%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 66% at 50% 50%, #000 70%, transparent 100%);
  filter: drop-shadow(0 0 24px rgba(255, 51, 71, .18));
}
.home-slogan { text-align: center; font-family: var(--marker); font-size: 20px; margin-top: 2px; color: #fff; transform: rotate(-2deg); }
.home-menu { margin-top: 42px; display: flex; flex-direction: column; gap: 4px; }
.menu-btn {
  position: relative; display: flex; align-items: center; gap: 14px; height: 50px; padding: 0 16px 0 20px;
  font-family: var(--head); font-size: 20px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; text-align: left;
  color: var(--text-2); border-radius: 6px; transition: background .15s, color .15s, padding .15s;
}
.menu-btn::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--lime); opacity: 0; transition: opacity .15s; }
.menu-btn .mi { font-size: 18px; width: 22px; color: var(--muted); transition: color .15s; }
.menu-btn kbd { margin-left: auto; font-family: var(--body); font-size: 11px; font-weight: 600; letter-spacing: .4px; padding: 2px 7px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 4px; color: rgba(255, 255, 255, .7); text-transform: none; }
.menu-btn:hover, .menu-btn.selected { background: linear-gradient(90deg, rgba(255, 51, 71, .12), transparent); color: #fff; padding-left: 26px; }
.menu-btn:hover::before, .menu-btn.selected::before { opacity: 1; }
.menu-btn:hover .mi, .menu-btn.selected .mi { color: var(--lime); }
.menu-btn.primary { color: #fff; background: linear-gradient(90deg, #e42a3a, #9e1220 70%, rgba(158, 18, 32, .2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); margin-bottom: 8px; }
.menu-btn.primary .mi { color: #fff; }
.menu-btn.primary:hover { background: linear-gradient(90deg, #f23848, #b31525 70%, rgba(179, 21, 37, .25)); }
.menu-btn.primary::before { display: none; }
.home-side-foot { margin-top: auto; }
.home-tagline { font-family: var(--marker); font-size: 19px; color: #fff; transform: rotate(-3deg); margin-bottom: 14px; }
.home-tagline::after { content: ''; display: block; width: 70%; height: 3px; margin-top: 4px; background: var(--lime); border-radius: 2px; box-shadow: 0 0 10px var(--lime); }
.home-footer { color: var(--muted); font-size: 12px; letter-spacing: .3px; }

.home-main { position: relative; display: flex; align-items: center; padding: 40px clamp(30px, 4vw, 80px); overflow: hidden; }
.home-croc {
  position: absolute; right: -1vw; bottom: 0; height: min(86%, 820px); width: auto; pointer-events: none;
  filter: drop-shadow(0 0 40px rgba(0, 0, 0, .5)); animation: crocFloat 7s ease-in-out infinite;
}
@keyframes crocFloat { 50% { transform: translateY(-8px); } }
.home-panel { position: relative; z-index: 1; width: min(760px, 58vw); max-height: calc(100% - 20px); display: flex; flex-direction: column; background: rgba(8, 16, 29, .9); }
.home-tab { display: none; min-height: 0; flex-direction: column; }
.home-tab.active { display: flex; animation: fadeUp .25s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

.play-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.name-row { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.big-input, .code-input {
  height: 44px; border-radius: 7px; border: 1px solid var(--edge-2); background: #050d18; outline: none;
  font-size: 17px; font-weight: 600; padding: 0 14px; color: #fff; transition: border-color .15s, box-shadow .15s;
}
.big-input:focus, .code-input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(255, 51, 71, .14); }
.big-input.shake, .code-input.shake { animation: shake .4s; border-color: var(--red); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.play-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.play-card { border: 1px solid var(--edge); border-radius: 8px; padding: 16px; background: rgba(3, 9, 18, .55); display: flex; flex-direction: column; gap: 8px; transition: border-color .2s; }
.play-card:hover, .play-card.focus { border-color: rgba(255, 51, 71, .5); }
.pc-title { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 19px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.pc-title [data-icon] { color: var(--lime); font-size: 15px; }
.play-card p { font-size: 14px; color: var(--muted); flex: 1; }
.play-card .btn { width: 100%; }
.code-row { display: flex; gap: 10px; }
.code-input { width: 0; flex: 1; text-transform: uppercase; letter-spacing: 8px; text-align: center; font-family: var(--head); font-size: 22px; font-weight: 800; }
.code-row .btn { flex: none; width: 110px; height: 44px; }
.play-foot { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: center; }
.play-banner { width: 100%; aspect-ratio: 3.2; object-fit: cover; border-radius: 8px; border: 1px solid var(--edge); }
.mini-rules { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); }
.mini-rules li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.3; }
.mini-rules li [data-icon] { color: var(--lime); font-size: 13px; margin-top: 3px; }
.resume-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; background: rgba(255, 160, 33, .1); border: 1px solid rgba(255, 160, 33, .5); font-size: 14px; }
.resume-card > [data-icon] { color: var(--orange); }
.resume-card b { color: var(--orange); }
.resume-card .btn { margin-left: auto; height: 34px; font-size: 14px; }

.config-body, .rules-body { padding: 10px 24px 20px; overflow-y: auto; }
.cfg-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid #142538; }
.cfg-row:last-child { border-bottom: 0; }
.cfg-text { flex: 1; min-width: 0; }
.cfg-text b { display: block; font-size: 15px; font-weight: 600; }
.cfg-text span { color: var(--muted); font-size: 13px; }
.toggle { width: 44px; height: 24px; border-radius: 12px; background: #1b2b40; border: 1px solid var(--edge-2); position: relative; transition: background .2s; flex: none; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #9fb3cb; transition: left .2s, background .2s; }
.toggle.on { background: #5b141c; border-color: var(--lime); }
.toggle.on::after { left: 23px; background: var(--lime); }
.toggle:disabled { opacity: .5; }
input[type=range] { width: 180px; accent-color: var(--lime); }
.seg { display: inline-flex; border: 1px solid var(--edge-2); border-radius: 6px; overflow: hidden; flex: none; }
.seg button { padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--edge-2); }
.seg button.on { background: var(--lime); color: #fff; }
.seg button:disabled { cursor: default; }
.seg button:not(.on):not(:disabled):hover { color: #fff; background: #13243a; }

.rules-body { user-select: text; }
.rules-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 18px; }
.rule-step { border: 1px solid var(--edge); border-radius: 8px; padding: 12px; background: rgba(3, 9, 18, .5); }
.rule-step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--lime); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.rule-step b { font-size: 15px; display: block; margin-bottom: 2px; }
.rule-step p { color: var(--text-2); font-size: 13px; line-height: 1.35; }
.rules-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; }
.rules-cols h3 { font-family: var(--head); font-size: 16px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; color: var(--lime); }
.rules-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rules-table th, .rules-table td { padding: 4px 6px; border-bottom: 1px solid #16273b; text-align: center; }
.rules-table th { color: var(--muted); font-weight: 600; }
.rules-table td:nth-child(2) { color: var(--crew); }
.rules-table td:nth-child(3) { color: var(--imp); }
.rules-note { color: var(--text-2); font-size: 13px; margin-bottom: 6px; line-height: 1.4; }

/* ============================================================ SALA */
#screen-room.active { display: grid; grid-template-rows: 60px 1fr; }
.topbar {
  position: relative; z-index: 3; display: flex; align-items: center; gap: 16px; padding: 0 var(--gap);
  background: linear-gradient(180deg, rgba(4, 9, 17, .96), rgba(6, 13, 24, .85)); border-bottom: 1px solid var(--edge);
}
.top-logo {
  height: 50px; -webkit-mask-image: radial-gradient(ellipse 62% 66% at 50% 50%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 66% at 50% 50%, #000 70%, transparent 100%);
}
.top-slogan { font-family: var(--marker); font-size: 16px; color: var(--text-2); white-space: nowrap; }
.phase-pill {
  margin: 0 auto; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 18px; border-radius: 17px;
  font-family: var(--head); font-size: 16px; font-weight: 800; letter-spacing: 1.4px; white-space: nowrap;
  background: rgba(255, 51, 71, .07); border: 1px solid rgba(255, 51, 71, .35); color: #ffd7db;
}
.phase-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.top-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 38px; height: 38px; border-radius: 7px; font-size: 17px; display: flex; align-items: center; justify-content: center; background: #0f1d31; border: 1px solid var(--edge-2); color: var(--text-2); transition: color .15s, border-color .15s; }
.icon-btn:hover { border-color: var(--lime); color: var(--lime); }
.icon-btn.danger:hover { border-color: var(--red); color: var(--red); }
.room-chip { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 7px; background: #0f1d31; border: 1px solid var(--edge-2); font-family: var(--head); font-size: 20px; font-weight: 800; letter-spacing: 3px; color: var(--lime); }
.room-chip .rc-label { font-family: var(--body); font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 1px; }
.room-chip [data-icon] { font-size: 14px; color: var(--muted); }
.room-chip:hover { border-color: var(--lime); }

.room-grid {
  min-height: 0; display: grid; gap: var(--gap); padding: var(--gap);
  grid-template-columns: var(--col-left) minmax(0, 1fr) var(--col-right);
}
.col { min-height: 0; display: flex; flex-direction: column; gap: var(--gap); }
.col-center { display: grid; grid-template-rows: minmax(0, 1fr) minmax(250px, 1fr) auto; }

/* coluna esquerda */
.role-panel { flex: none; }
.role-body { padding: 12px; }
.role-cover {
  height: 210px; border-radius: 8px; border: 1px dashed var(--edge-2); display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; position: relative; overflow: hidden;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .015) 0 10px, transparent 10px 20px);
}
.role-cover .eye { font-size: 30px; color: var(--lime); margin-bottom: 4px; }
.cover-face { display: flex; flex-direction: column; align-items: center; gap: 2px; transition: opacity .15s; }
.cover-face b { color: var(--text-2); font-size: 14px; }
.role-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px; opacity: 0; transition: opacity .15s; }
.role-cover:hover .role-face, .role-cover.peek .role-face, .role-cover.always .role-face { opacity: 1; }
.role-cover:hover .cover-face, .role-cover.peek .cover-face, .role-cover.always .cover-face { opacity: 0; }
.role-face.crew { background: radial-gradient(circle at 50% 30%, rgba(79, 177, 255, .3), rgba(5, 15, 30, .97)); }
.role-face.impostor { background: radial-gradient(circle at 50% 30%, rgba(255, 61, 61, .32), rgba(30, 5, 8, .97)); }
.role-emblem { width: 76px; height: 48px; }
.role-emblem svg { width: 100%; height: 100%; }
.role-name { font-family: var(--head); font-size: 28px; font-weight: 900; letter-spacing: 2px; line-height: 1; }
.role-face.crew .role-name { color: #a9d8ff; }
.role-face.impostor .role-name { color: #ffa29b; }
.role-goal { font-size: 13px; color: #dce7f3; line-height: 1.3; }
.role-allies { font-size: 13px; color: #ffb4ad; }
.role-lobby { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-2); }
.role-lobby .muted { color: var(--muted); font-size: 12px; }
.comp-big { display: flex; gap: 8px; }
.comp-big div { flex: 1; border-radius: 8px; padding: 8px; text-align: center; border: 1px solid var(--edge); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.comp-big b { font-family: var(--head); font-size: 30px; display: block; line-height: 1.05; }
.comp-big .c { color: var(--crew); background: rgba(79, 177, 255, .07); }
.comp-big .i { color: var(--imp); background: rgba(255, 61, 61, .07); }

.croc-corner { position: relative; flex: 1; min-height: 150px; pointer-events: none; display: flex; flex-direction: column; justify-content: flex-end; }
.croc-corner img { position: relative; display: block; width: 100%; max-height: 100%; object-fit: contain; object-position: left bottom; }
.croc-tip {
  position: relative; z-index: 1; order: -1; align-self: flex-end; margin-bottom: -38px; width: 64%; padding: 9px 11px; border-radius: 10px 10px 2px 10px;
  background: #fff0f2; color: #0b1a0c; font-size: 13px; font-weight: 600; line-height: 1.3;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5); animation: tipIn .35s ease both;
}
.croc-tip::before { content: 'DICA DO AGENTE'; display: block; font-size: 10px; font-weight: 800; color: #b3121f; letter-spacing: 1px; margin-bottom: 2px; }
@keyframes tipIn { from { opacity: 0; transform: translateY(6px); } }
.rules-panel { flex: none; }
.rules-panel .panel-h { letter-spacing: .8px; }
.rules-panel .mini-rules { padding: 10px 14px 6px; font-size: 13px; gap: 5px; }
.rules-more { display: block; padding: 0 14px 12px 34px; text-align: left; }

/* jogadores */
.players-panel { display: flex; flex-direction: column; }
.players-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(84px, 1fr)); gap: 10px; padding: 12px; }
.pcard {
  position: relative; min-height: 84px; border-radius: 8px; border: 1px solid var(--edge); background: linear-gradient(180deg, #0f1e33, #0a1524);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  transition: transform .12s, border-color .15s, box-shadow .15s, opacity .2s;
}
.players-grid .avatar { width: clamp(40px, 5.2vh, 64px); height: clamp(40px, 5.2vh, 64px); font-size: clamp(19px, 2.4vh, 28px); }
.players-grid .pname { font-size: clamp(14px, 1.7vh, 17px); }
.players-grid.one-row { grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); grid-template-rows: clamp(120px, 21vh, 230px); }
.col-center:has(.players-grid.one-row) { grid-template-rows: auto minmax(250px, 1fr) auto; }
.players-grid.one-row .pcard { gap: 10px; }
.players-grid.one-row .avatar { width: clamp(52px, 8vh, 96px); height: clamp(52px, 8vh, 96px); font-size: clamp(24px, 3.6vh, 42px); }
.players-grid.one-row .pname { font-size: clamp(16px, 2vh, 21px); }
@keyframes cardIn { from { opacity: 0; transform: translateY(6px); } }
.pcard.empty { border-style: dashed; background: transparent; color: #33495f; font-size: 12px; animation: none; }
.pcard.empty .avatar { background: #0c1828; color: #2b415b; box-shadow: none; }
.pcard.selectable { cursor: pointer; }
.pcard.selectable:hover { transform: translateY(-2px); border-color: #ff5a68; }
.pcard.selected { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime), 0 0 18px rgba(255, 51, 71, .25); background: linear-gradient(180deg, #331018, #1a080c); }
.pcard.offline { opacity: .5; }
.pcard.ally { box-shadow: inset 0 0 0 1px rgba(255, 70, 70, .6); }
.pcard.selected.ally { box-shadow: 0 0 0 1px var(--lime), inset 0 0 0 1px rgba(255, 70, 70, .6); }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none;
  font-family: var(--head); font-size: 22px; font-weight: 800; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .12), inset 0 -4px 0 rgba(0, 0, 0, .18);
}
.pname { font-size: 15px; font-weight: 600; max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .tag { position: absolute; font-size: 10px; font-weight: 700; letter-spacing: .6px; padding: 1px 6px; border-radius: 4px; text-transform: uppercase; }
.tag.you { left: 6px; top: 6px; background: #22405f; color: #cfe3fa; }
.tag.host { right: 6px; top: 6px; color: var(--gold); border: 1px solid rgba(255, 204, 51, .4); }
.tag.ally { left: 6px; top: 6px; background: var(--red); color: #fff; }
.tag.off { left: 50%; transform: translateX(-50%); bottom: 6px; background: #3a1a1a; color: #ff9b9b; }
.crown { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-size: 22px; color: var(--gold); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.status-chip { position: absolute; right: 6px; bottom: 6px; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #16324a; color: #9fd4ff; display: flex; gap: 3px; align-items: center; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.status-chip.done { background: #0f2e57; color: var(--lime); }
.vote-stamp { position: absolute; inset: 0; border-radius: 8px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; font-size: 11px; font-weight: 800; letter-spacing: 1px; pointer-events: none; animation: stampIn .3s ease both; }
.vote-stamp.yes { background: linear-gradient(0deg, rgba(58, 160, 255, .4), transparent 50%); color: #cfe6ff; }
.vote-stamp.no { background: linear-gradient(0deg, rgba(255, 60, 60, .4), transparent 50%); color: #ffc0bb; }
@keyframes stampIn { from { opacity: 0; } }
.kick-btn { position: absolute; right: 5px; bottom: 5px; width: 22px; height: 22px; border-radius: 5px; background: #3a1418; color: #ff8a80; font-size: 12px; opacity: 0; transition: opacity .15s; z-index: 2; }
.pcard:hover .kick-btn { opacity: 1; }

/* missão */
.mission-panel {
  display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(ellipse 60% 90% at 30% 0%, rgba(255, 51, 71, .09), transparent 60%), radial-gradient(ellipse 60% 90% at 90% 100%, rgba(58, 140, 255, .08), transparent 60%), rgba(9, 12, 20, .94);
  border-color: #2a2f44;
}
.mission-panel::after {
  content: ''; position: absolute; right: 0; top: 40px; bottom: 0; width: 46%; pointer-events: none; z-index: 0;
  background: url(assets/station.jpg) center / cover no-repeat; opacity: .16;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.mission-panel > * { position: relative; z-index: 1; }
.mission-panel.danger { background: radial-gradient(ellipse 70% 100% at 40% 0%, rgba(255, 60, 60, .16), transparent 60%), rgba(26, 9, 12, .92); border-color: #5a2226; }
.mission-panel.calm { background: radial-gradient(ellipse 70% 100% at 40% 0%, rgba(79, 177, 255, .14), transparent 60%), rgba(9, 18, 32, .92); border-color: #234565; }
.mission-body { flex: 1; min-height: 0; display: flex; }
.mission-main { flex: 1; min-width: 0; padding: 16px 22px; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 10px; text-align: center; overflow-y: auto; }
.mission-timer { width: 170px; border-left: 1px solid rgba(255, 255, 255, .07); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; margin: 14px 0; flex: none; }
.mission-timer:empty { display: none; }
.m-title { font-family: var(--head); font-size: clamp(28px, 3.4vh, 40px); font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--lime); line-height: 1; }
.mission-panel.danger .m-title { color: #ff8a80; }
.mission-panel.calm .m-title { color: #9fd4ff; }
.m-sub { font-size: clamp(15px, 1.75vh, 18px); color: var(--text-2); }
.m-sub b { color: #fff; }
.m-hint { font-size: 13px; color: var(--muted); }
.slots { display: flex; gap: 8px; justify-content: center; }
.slot { width: 56px; height: 56px; border-radius: 8px; border: 1px dashed #5a2a30; background: rgba(0, 0, 0, .25); display: flex; align-items: center; justify-content: center; font-size: 20px; color: #6b3a40; }
.slot.filled { border-style: solid; border-color: var(--lime); background: rgba(255, 51, 71, .1); animation: slotPop .25s ease both; }
@keyframes slotPop { from { transform: scale(.7); } 60% { transform: scale(1.08); } }
.slot .avatar { width: 40px; height: 40px; font-size: 18px; }
.m-actions { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 4px; }
.choice-row { display: flex; gap: 14px; justify-content: center; }
.choice {
  width: clamp(190px, 12vw, 230px); height: clamp(96px, 12vh, 128px); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--head); font-size: 22px; font-weight: 900; letter-spacing: 1.4px; border: 1px solid; color: #fff;
  transition: transform .12s, box-shadow .15s, filter .15s; position: relative;
}
.choice [data-icon] { font-size: 30px; }
.choice small { font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: 0; opacity: .85; }
.choice.wide { flex-direction: row; height: 58px; width: 200px; gap: 10px; font-size: 20px; }
.choice.wide [data-icon] { font-size: 20px; }
.choice.help { background: linear-gradient(180deg, #2373d3, #0f3a78); border-color: #6fb6ff; }
.choice.sab { background: linear-gradient(180deg, #cf2830, #6a0c11); border-color: #ff8077; }
.choice.approve { background: linear-gradient(180deg, #2d8cf0, #0f3f85); border-color: #8cc8ff; }
.choice.reject { background: linear-gradient(180deg, #cf2830, #6a0c11); border-color: #ff8077; }
.choice:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.12); }
.choice:disabled { filter: grayscale(.85) brightness(.55); }
.choice .lock { position: absolute; top: 6px; right: 8px; font-size: 14px; }
.chosen { font-family: var(--head); font-size: 20px; font-weight: 800; letter-spacing: 1px; padding: 8px 18px; border-radius: 8px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .12); display: flex; gap: 8px; align-items: center; text-transform: uppercase; }
.chosen.yes { color: var(--lime); } .chosen.no { color: #ff8a80; } .chosen.help { color: #9fd4ff; } .chosen.sab { color: #ff8a80; }
.team-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 640px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 14px; background: rgba(255, 255, 255, .07); font-size: 13px; font-weight: 600; }
.chip .avatar { width: 22px; height: 22px; font-size: 11px; box-shadow: none; }
.chip.yes { background: rgba(255, 51, 71, .14); color: #cfe6ff; } .chip.no { background: rgba(255, 61, 61, .16); color: #ffc7c2; }
.warn { color: var(--orange); font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .12); border-top-color: var(--lime); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* lobby (dentro do painel de missão) */
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; width: 100%; max-width: 900px; text-align: left; align-items: stretch; }
.lobby-left { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.invite-box { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 8px; background: rgba(0, 0, 0, .3); border: 1px dashed #6a2a33; }
.invite-code { font-family: var(--head); font-size: 40px; font-weight: 900; letter-spacing: 8px; color: var(--lime); line-height: 1; }
.invite-box .btn { margin-left: auto; }
.lobby-right { display: flex; flex-direction: column; gap: 2px; padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, .07); }
.lobby-right .cfg-row { padding: 8px 0; gap: 12px; border-color: rgba(255, 255, 255, .06); }
.seg-wrap { display: flex; flex-direction: column; gap: 5px; padding: 4px 0 8px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.seg-wrap b { font-size: 15px; font-weight: 600; }
.seg-wrap .seg { align-self: flex-start; }
.seg-wrap > span { font-size: 12px; color: var(--muted); }
.lobby-right > .btn { margin-top: 12px; width: 100%; }

/* timer */
.ring { position: relative; width: clamp(96px, 12vh, 130px); height: clamp(96px, 12vh, 130px); }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .bgc { stroke: rgba(255, 255, 255, .08); }
.ring .fgc { stroke: var(--lime); transition: stroke .3s, stroke-dashoffset .2s linear; }
.ring.low .fgc { stroke: var(--red); }
.ring.low .num { color: #ff8a80; animation: pulse .5s infinite; }
.ring .num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-size: 36px; font-weight: 800; }
.timer-label { font-size: 12px; color: var(--text-2); text-align: center; line-height: 1.3; text-transform: uppercase; letter-spacing: .6px; }
.timer-inf { font-family: var(--head); font-size: 44px; font-weight: 800; color: var(--muted); line-height: 1; }

/* trilha */
.track-panel { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.mnode { width: 92px; height: 66px; border-radius: 8px; border: 1px solid var(--edge); background: rgba(5, 12, 22, .7); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; transition: all .25s; flex: none; }
.mnode .ml { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: 1px; }
.mnode .ms { font-family: var(--head); font-size: 26px; font-weight: 800; line-height: 1; display: flex; align-items: baseline; gap: 3px; }
.mnode .ms small { font-family: var(--body); font-size: 11px; color: var(--muted); font-weight: 500; }
.mnode .ms svg { width: 26px; height: 26px; }
.mnode .mx { position: absolute; bottom: -8px; font-size: 9px; font-weight: 800; background: var(--orange); color: #2a1500; padding: 0 5px; border-radius: 4px; white-space: nowrap; }
.mnode.current { border-color: var(--lime); box-shadow: 0 0 14px rgba(255, 51, 71, .3); }
.mnode.ok { border-color: #3b8fe0; background: radial-gradient(circle, rgba(79, 177, 255, .35), rgba(10, 30, 60, .9)); }
.mnode.fail { border-color: #d63c3c; background: radial-gradient(circle, rgba(255, 61, 61, .4), rgba(60, 10, 14, .9)); }
.mnode.ok .ms { color: #bfe3ff; } .mnode.fail .ms { color: #ffd0cc; }
.track-sep { flex: 1; max-width: 26px; min-width: 6px; height: 2px; background: var(--edge); }
.rej-box { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-left: 12px; }
.rej-box .rl { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: 1px; }
.rej-dots { display: flex; gap: 5px; }
.rej-dots i { width: 22px; height: 22px; border-radius: 5px; border: 1px solid #4a2a2a; background: rgba(255, 61, 61, .05); display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: 11px; color: #6c3a3a; }
.rej-dots i.on { background: var(--red); border-color: #ff8a80; color: #fff; box-shadow: 0 0 8px rgba(255, 61, 61, .5); }
.rej-dots i:last-child { border-style: dashed; }

/* direita */
.progress-panel { flex: none; }
.prog-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
.prog-box { border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 6px; border: 1px solid; }
.prog-box.crew { background: radial-gradient(circle at 50% 30%, rgba(79, 177, 255, .18), rgba(8, 20, 40, .9)); border-color: #1f4c7a; }
.prog-box.imp { background: radial-gradient(circle at 50% 30%, rgba(255, 61, 61, .2), rgba(40, 8, 12, .9)); border-color: #6a1f26; }
.prog-box .pt { font-family: var(--head); font-size: 15px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.prog-box.crew .pt { color: var(--crew); } .prog-box.imp .pt { color: var(--imp); }
.prog-box svg { width: 72px; height: 44px; }
.prog-box .pv { font-family: var(--head); font-size: 30px; font-weight: 900; line-height: 1; }
.prog-box .pl { font-size: 11px; color: var(--muted); text-align: center; }
.prog-box.bump { animation: bump .6s ease; }
@keyframes bump { 30% { transform: scale(1.06); } }

.chat-panel { flex: 1; display: flex; flex-direction: column; min-height: 160px; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; user-select: text; }
.chat-log .msg { line-height: 1.35; word-wrap: break-word; animation: fadeUp .2s ease both; }
.chat-log .msg b { font-weight: 700; }
.chat-log .msg.sys { color: var(--muted); font-size: 12px; font-style: italic; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--edge); }
.chat-form input { flex: 1; min-width: 0; height: 36px; border-radius: 6px; border: 1px solid var(--edge-2); background: #050d18; padding: 0 10px; font-size: 14px; outline: none; }
.chat-form input:focus { border-color: var(--lime); }
.send-btn { width: 40px; height: 36px; border-radius: 6px; background: linear-gradient(180deg, #ff4a5a, #b3121f); font-size: 15px; color: #fff; display: flex; align-items: center; justify-content: center; }
.chat-log::-webkit-scrollbar, .history-list::-webkit-scrollbar, .rules-body::-webkit-scrollbar, .modal-body::-webkit-scrollbar, .mission-main::-webkit-scrollbar, .play-body::-webkit-scrollbar { width: 8px; }
.chat-log::-webkit-scrollbar-thumb, .history-list::-webkit-scrollbar-thumb, .rules-body::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb, .mission-main::-webkit-scrollbar-thumb, .play-body::-webkit-scrollbar-thumb { background: #22364d; border-radius: 4px; }

.history-panel { flex: none; }
.history-list { padding: 4px 14px 8px; }
.hrow { display: flex; align-items: center; gap: 8px; height: 30px; font-size: 13px; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.hrow:last-child { border-bottom: 0; }
.hrow .hi { width: 16px; color: #4e6580; display: flex; }
.hrow .hi svg { width: 14px; height: 14px; }
.hrow .hn { width: 64px; color: var(--text-2); }
.hrow .ht { font-size: 11px; color: var(--muted); }
.hrow .hr { margin-left: auto; font-weight: 700; }
.hrow.ok .hi, .hrow.ok .hr { color: var(--lime); } .hrow.fail .hi, .hrow.fail .hr { color: var(--red); }
.hrow.cur .hn { color: #fff; font-weight: 700; }

/* ============================================================ OVERLAYS */
.overlay { position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(4, 12, 24, .88), rgba(2, 6, 12, .96)); animation: fadeIn .25s ease both; overflow: hidden; }
.overlay.closing { animation: fadeOut .3s ease both; }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
.ov-skip { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 13px; }
.ov-col { display: flex; flex-direction: column; align-items: center; gap: 18px; position: relative; z-index: 2; max-width: 92vw; }
.ov-title { font-family: var(--head); font-size: clamp(44px, 5vw, 72px); font-weight: 900; letter-spacing: 3px; text-align: center; line-height: 1; text-transform: uppercase; }
.ov-title.sm { font-size: clamp(34px, 3.4vw, 50px); }
.ov-sub { font-size: 19px; text-align: center; color: #d8e4f1; }
.ov-score { font-family: var(--head); font-size: 32px; font-weight: 900; letter-spacing: 1px; }

.flip { width: 380px; height: 500px; perspective: 1400px; cursor: pointer; }
.flip-inner { position: relative; width: 100%; height: 100%; transition: transform .9s cubic-bezier(.2, .8, .2, 1); transform-style: preserve-3d; }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; border-radius: 18px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px; text-align: center; border: 2px solid; }
.flip-back { background: radial-gradient(circle at 50% 35%, #4a0e17, #0a0306 70%); border-color: var(--lime); box-shadow: 0 0 50px rgba(255, 51, 71, .3); }
.flip-back img { width: 280px; }
.flip-back .fb-t { font-family: var(--head); font-size: 32px; font-weight: 900; letter-spacing: 3px; }
.flip-back .fb-s { font-size: 15px; color: #ffc9cf; animation: pulse 1.6s infinite; }
.flip-front { transform: rotateY(180deg); }
.flip-front.crew { background: radial-gradient(circle at 50% 30%, #1d4f8a, #06142a 70%); border-color: #7cc0ff; box-shadow: 0 0 60px rgba(79, 177, 255, .4); }
.flip-front.impostor { background: radial-gradient(circle at 50% 30%, #8a1d23, #2a0609 70%); border-color: #ff8a80; box-shadow: 0 0 60px rgba(255, 61, 61, .45); }
.flip-front .ff-k { font-size: 14px; letter-spacing: 4px; color: rgba(255, 255, 255, .7); }
.flip-front .ff-role { font-family: var(--head); font-size: 52px; font-weight: 900; letter-spacing: 3px; line-height: 1; }
.flip-front.crew .ff-role { color: #bfe3ff; } .flip-front.impostor .ff-role { color: #ffc0bb; }
.flip-front svg { width: 160px; height: 100px; }
.flip-front .ff-goal { font-size: 16px; line-height: 1.4; }
.flip-front .ff-allies { font-size: 15px; padding: 8px 14px; border-radius: 8px; background: rgba(0, 0, 0, .35); }
.flip-front .ff-allies b { color: #ffb4ad; }
.ready-line { font-size: 14px; color: var(--muted); }

.fly-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; max-width: 1100px; }
.fly { display: flex; flex-direction: column; align-items: center; gap: 8px; animation: flyIn .55s cubic-bezier(.2, .9, .3, 1.3) both; }
.fly .avatar { width: 76px; height: 76px; font-size: 34px; }
.fly span { font-size: 17px; font-weight: 600; }
@keyframes flyIn { from { opacity: 0; transform: translateY(50px) scale(.6); } }

.vote-grid { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; max-width: 1100px; }
.vcard { width: 112px; height: 148px; perspective: 800px; }
.vcard-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.2, .8, .2, 1); }
.vcard.show .vcard-inner { transform: rotateY(180deg); }
.vcard-face { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--edge-2); background: #0d1b2d; }
.vcard-face .avatar { width: 52px; height: 52px; font-size: 24px; }
.vcard-face span { font-size: 14px; font-weight: 600; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcard-face.back { transform: rotateY(180deg); }
.vcard-face.back.yes { background: linear-gradient(180deg, #2477d6, #0b2c5e); border-color: #8cc8ff; }
.vcard-face.back.no { background: linear-gradient(180deg, #b0222a, #3c070b); border-color: #ff8a80; }
.vcard-face.back.miss { background: linear-gradient(180deg, #555, #222); border-color: #999; }
.vcard-face.back b { font-family: var(--head); font-size: 17px; letter-spacing: 1px; }
.vcard-face.back [data-icon] { font-size: 30px; }
.verdict { font-family: var(--head); font-size: 56px; font-weight: 900; letter-spacing: 4px; opacity: 0; transform: scale(2) rotate(-5deg); border: 5px solid; padding: 2px 28px; border-radius: 12px; }
.verdict.in { animation: stamp .45s cubic-bezier(.2, .9, .3, 1.4) forwards; }
.verdict.yes { color: var(--lime); border-color: var(--lime); text-shadow: 0 0 24px rgba(255, 51, 71, .5); }
.verdict.no { color: var(--red); border-color: var(--red); text-shadow: 0 0 24px rgba(255, 61, 61, .5); }
@keyframes stamp { to { opacity: 1; transform: scale(1) rotate(-5deg); } }

.warp { position: absolute; inset: 0; overflow: hidden; z-index: 1; }
.warp i { position: absolute; left: 50%; top: 50%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--c, #bfe3ff)); transform-origin: 0 50%; animation: warp 1.2s linear infinite; opacity: 0; }
@keyframes warp { 0% { opacity: 0; transform: rotate(var(--a)) translateX(30px) scaleX(.2); } 20% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateX(60vw) scaleX(1.6); } }
.scan { width: 460px; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.scan i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--lime)); animation: scanFill 1.5s ease-in-out forwards; }
@keyframes scanFill { to { width: 100%; } }
.result-big { font-family: var(--head); font-size: clamp(70px, 8vw, 120px); font-weight: 900; letter-spacing: 6px; line-height: 1; animation: resultIn .6s cubic-bezier(.2, .9, .3, 1.3) both; }
.result-big.ok { color: var(--lime); text-shadow: 0 0 50px rgba(255, 51, 71, .6); }
.result-big.fail { color: var(--red); text-shadow: 0 0 50px rgba(255, 61, 61, .7); animation: resultIn .6s cubic-bezier(.2, .9, .3, 1.3) both, glitch .25s steps(2) .6s 4; }
@keyframes resultIn { from { opacity: 0; transform: scale(2.4); filter: blur(10px); } }
@keyframes glitch { 0% { transform: translate(-5px, 2px); } 50% { transform: translate(5px, -2px); } 100% { transform: none; } }
.overlay.shake { animation: fadeIn .25s ease both, shake .4s .7s; }
.overlay.red-flash::after, .overlay.green-flash::after { content: ''; position: absolute; inset: 0; animation: flash 1s .6s ease both; pointer-events: none; }
.overlay.red-flash::after { background: radial-gradient(circle, rgba(255, 40, 40, .35), transparent 70%); }
.overlay.green-flash::after { background: radial-gradient(circle, rgba(255, 51, 71, .25), transparent 70%); }
@keyframes flash { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
.particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }

.end-title { font-family: var(--head); font-size: clamp(70px, 8vw, 116px); font-weight: 900; letter-spacing: 6px; line-height: 1; animation: resultIn .8s cubic-bezier(.2, .9, .3, 1.3) both; }
.end-title.win { color: var(--lime); text-shadow: 0 0 50px rgba(255, 51, 71, .6); }
.end-title.lose { color: var(--red); text-shadow: 0 0 50px rgba(255, 61, 61, .6); }
.end-team { font-family: var(--head); font-size: 28px; font-weight: 800; letter-spacing: 2px; }
.end-team.crew { color: #9fd4ff; } .end-team.imp { color: #ff8a80; }
.end-reason { font-size: 16px; color: var(--text-2); }
.roles-grid { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 1240px; }
.rcard { width: 104px; padding: 10px 6px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid; animation: flyIn .45s cubic-bezier(.2, .9, .3, 1.3) both; }
.rcard .avatar { width: 44px; height: 44px; font-size: 20px; }
.rcard span { font-size: 14px; font-weight: 600; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard small { font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.rcard.crew { background: rgba(20, 60, 110, .55); border-color: #4fb1ff; } .rcard.crew small { color: #9fd4ff; }
.rcard.impostor { background: rgba(110, 20, 26, .55); border-color: #ff5a4e; } .rcard.impostor small { color: #ffb4ad; }
.rcard.me { box-shadow: 0 0 0 2px #fff; }
.end-actions { display: flex; gap: 12px; margin-top: 6px; align-items: center; }

/* ============================================================ MODAL / TOAST */
.modal { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(2, 6, 12, .7); animation: fadeIn .15s both; }
.modal-box { width: min(980px, 88vw); max-height: 86vh; display: flex; flex-direction: column; background: var(--panel-solid); animation: fadeUp .2s ease both; }
.modal-box.sm { width: min(560px, 88vw); }
.modal-x { margin-left: auto; font-size: 16px; color: var(--muted); width: 28px; height: 28px; border-radius: 6px; }
.modal-x:hover { color: #fff; background: #1b2c42; }
.modal-body { padding: 16px 22px; overflow-y: auto; user-select: text; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 0 22px 18px; }
.modal-text { font-size: 16px; line-height: 1.5; color: var(--text-2); }
.modal-lead { font-size: 15px; margin-bottom: 12px; color: var(--text-2); }
.hist-round { margin-bottom: 12px; border: 1px solid var(--edge); border-radius: 8px; overflow: hidden; }
.hist-round > header { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: rgba(255, 255, 255, .03); font-family: var(--head); font-size: 17px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.hist-round > header .meta { font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }
.hist-round > header .res { margin-left: auto; }
.hist-round > header .res.ok { color: var(--lime); } .hist-round > header .res.fail { color: var(--red); }
.hist-prop { display: grid; grid-template-columns: 150px 1fr 150px; gap: 12px; padding: 8px 14px; border-top: 1px solid #15263a; font-size: 14px; align-items: center; }
.hist-prop .pv { text-align: right; }
.hist-prop .pv.ok { color: var(--lime); font-weight: 700; } .hist-prop .pv.no { color: #ff8a80; font-weight: 700; }
.hist-prop .who { color: var(--muted); font-size: 12px; }
.hist-prop .team-chips { justify-content: flex-start; }
.hist-empty { color: var(--muted); padding: 24px; text-align: center; }

#toasts { position: absolute; left: 50%; top: 72px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 9px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; background: #0f1f33; border: 1px solid var(--edge-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); animation: toastIn .25s ease both; }
.toast.err { border-color: var(--red); color: #ffd0cc; background: #2a0d10; }
.toast.ok { border-color: var(--lime); color: #d6eaff; background: #0d2038; }
.toast.out { animation: fadeOut .35s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }
.conn-banner { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90; padding: 8px 18px; border-radius: 8px; background: #3a2205; border: 1px solid var(--orange); color: #ffd9a3; font-size: 14px; font-weight: 700; animation: pulse 1.4s infinite; }

/* telas menores (notebooks 1280–1440) */
@media (max-width: 1500px) {
  :root { --gap: 10px; }
  .top-slogan { display: none; }
  .mission-timer { width: 140px; }
  .ring .num { font-size: 30px; }
  .mnode { width: 78px; }
  .lobby-grid { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-height: 820px) {
  .croc-corner { display: none; }
  .lobby-right .cfg-text span, .seg-wrap > span { display: none; }
  .lobby-right .cfg-row { padding: 6px 0; }
  .lobby-left { gap: 6px; }
  .invite-box { padding: 8px 12px; }
  .invite-code { font-size: 32px; }
  .lobby-left .m-hint { display: none; }
  .mission-main { padding: 10px 18px; gap: 8px; }
  .role-cover { height: 160px; }
  .col-center { grid-template-rows: minmax(0, 1fr) minmax(230px, 1.1fr) auto; }
  .pcard { gap: 3px; }
}
/* monitores grandes (1440p+) */
@media (min-width: 2200px) {
  body { font-size: 16px; }
  .panel-h { height: 46px; font-size: 18px; }
}

body.reduced *, body.reduced *::before, body.reduced *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; }

/* ====================================================== PROTOCOLO */
.brand { display: flex; flex-direction: column; align-items: center; line-height: .9; user-select: none; }
.brand-top { font-family: var(--head); font-weight: 900; letter-spacing: .42em; padding-left: .42em; color: #d6eaff; text-shadow: 0 0 14px rgba(58, 160, 255, .75); }
.brand-main { font-family: var(--marker); color: var(--lime); transform: rotate(-4deg); text-shadow: 0 3px 0 #000, 0 0 26px rgba(255, 51, 71, .65); }
.brand-lg { margin-top: 6px; }
.brand-lg .brand-top { font-size: 24px; }
.brand-lg .brand-main { font-size: 92px; margin-top: 2px; }
.brand-sm { flex-direction: row; align-items: center; gap: 10px; }
.brand-sm .brand-top { font-size: 13px; letter-spacing: .3em; }
.brand-sm .brand-main { font-size: 30px; }
.home-slogan { margin-top: 18px; color: var(--text-2); }
.home-croc { height: min(88%, 840px); filter: drop-shadow(0 0 60px rgba(0, 0, 0, .6)); }

/* sucesso, aprovação e "sua vez" em azul; vermelho fica para destaque e perigo */
.verdict.yes { color: var(--ok); border-color: var(--ok); text-shadow: 0 0 24px rgba(58, 160, 255, .55); }
.result-big.ok { color: var(--ok); text-shadow: 0 0 50px rgba(58, 160, 255, .6); }
.end-title.win { color: var(--ok); text-shadow: 0 0 50px rgba(58, 160, 255, .6); }
.hrow.ok .hi, .hrow.ok .hr, .chosen.yes, .hist-prop .pv.ok, .hist-round > header .res.ok { color: var(--ok); }
.status-chip.done { color: #9fd0ff; }
.chip.yes { background: rgba(58, 160, 255, .16); color: #cfe6ff; }
.ring .fgc { stroke: var(--ok); }
.ring.low .fgc { stroke: var(--red); }
.mission-panel.danger { border-color: #8a2230; background: radial-gradient(ellipse 70% 100% at 40% 0%, rgba(255, 51, 71, .22), transparent 60%), rgba(28, 7, 12, .94); }
.overlay.green-flash::after { background: radial-gradient(circle, rgba(58, 160, 255, .28), transparent 70%); }
.scan i { background: linear-gradient(90deg, var(--ok), var(--lime)); }
.menu-btn kbd { border-color: rgba(255, 255, 255, .3); }

/* ====================================================== PROTOCOLO — menu inicial (v3) */
:root { --head: 'Teko', 'Saira Condensed', 'Arial Narrow', sans-serif; --red-neon: #ff2438; }
#screen-home.active { display: grid; grid-template-columns: clamp(340px, 26vw, 500px) minmax(0, 1fr); background: #04050a; }
.home-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.home-planet {
  position: absolute; width: 58vw; height: 58vw; right: -22vw; top: 14vh; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 32%, rgba(190, 220, 255, .55), transparent 18%),
    repeating-radial-gradient(circle at 40% 45%, rgba(255, 255, 255, .03) 0 3px, transparent 3px 11px),
    radial-gradient(circle at 38% 40%, #4c79c9 0%, #24448a 30%, #0f2150 55%, #050a1c 72%);
  box-shadow: 0 0 90px 18px rgba(70, 130, 255, .32), inset -70px -40px 140px rgba(0, 0, 0, .85);
}
.home-planet::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid rgba(140, 190, 255, .55); filter: blur(2px); clip-path: polygon(0 0, 60% 0, 30% 100%, 0 100%); }
#screen-home .home-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 30% 40% at 55% 18%, rgba(255, 30, 50, .22), transparent 70%),
    radial-gradient(ellipse 25% 25% at 70% 8%, rgba(255, 40, 60, .18), transparent 70%);
}
.home-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-hero { position: absolute; right: 2vw; bottom: 0; height: min(84vh, 880px); width: auto; filter: drop-shadow(0 0 40px rgba(0, 0, 0, .8)); }
.home-side { background: linear-gradient(90deg, rgba(2, 3, 7, .97) 60%, rgba(2, 3, 7, .75)); border-right: 0; box-shadow: none; padding: 26px 30px 34px; position: relative; overflow: hidden; }
.home-logo { width: 100%; max-width: 460px; -webkit-mask-image: none; mask-image: none; filter: none; align-self: flex-start; margin-left: -6px; }
.home-slogan { font-family: var(--head); font-size: 21px; font-weight: 500; letter-spacing: .22em; white-space: nowrap; color: #e8ecf4; transform: none; text-align: left; margin-top: -4px; }
.home-slogan em, .top-slogan em { color: var(--red-neon); font-style: italic; }
.home-menu { margin-top: 34px; gap: 6px; }
.menu-btn { font-family: var(--head); font-size: 27px; font-weight: 500; letter-spacing: 1.2px; height: 58px; color: #c3c9d6; padding-left: 26px; }
.menu-btn .mi { font-size: 26px; width: 34px; color: #8b93a5; }
.menu-btn:hover, .menu-btn.selected { background: linear-gradient(90deg, rgba(255, 36, 56, .14), transparent); padding-left: 30px; }
.menu-btn.primary {
  height: 70px; color: #fff; font-weight: 600; font-size: 29px;
  background: linear-gradient(90deg, rgba(120, 6, 16, .95), rgba(40, 3, 8, .9)); border: 2px solid var(--red-neon);
  box-shadow: 0 0 18px rgba(255, 36, 56, .55), inset 0 0 18px rgba(255, 36, 56, .25);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  margin-bottom: 14px; border-radius: 0;
}
.menu-btn.primary .mi { color: #fff; font-size: 30px; }
.menu-btn.primary:hover { background: linear-gradient(90deg, rgba(150, 10, 22, .95), rgba(50, 4, 10, .9)); }
.badge-online { margin-left: auto; font-family: var(--head); font-size: 17px; font-weight: 500; letter-spacing: 1px; color: #ff4a5c; border: 1px solid #ff4a5c; padding: 0 8px; border-radius: 3px; line-height: 24px; }
.home-tagline { margin-top: auto; font-family: var(--head); font-style: italic; font-size: 22px; letter-spacing: .26em; color: #e6eaf2; transform: rotate(-4deg); line-height: 1.15; }
.home-tagline em { color: var(--red-neon); }
.home-tagline::after { width: 85%; height: 2px; background: linear-gradient(90deg, var(--red-neon), transparent); box-shadow: 0 0 10px var(--red-neon); margin-top: 8px; }
.home-side-foot, .home-footer { display: none; }

.home-main { padding: 0 0 0 clamp(20px, 2vw, 40px); align-items: center; }
.home-panel.cut { width: min(720px, 44vw); max-height: calc(100vh - 80px); background: none; border: 0; box-shadow: none; }
.cut, .cut-sm { --c: 26px; position: relative; isolation: isolate; clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); background: linear-gradient(160deg, #ff2438, #5a0b14 45%, #2a0c14 70%, #ff2438); }
.cut::before, .cut-sm::before { content: ''; position: absolute; inset: 2px; z-index: -1; clip-path: polygon(calc(var(--c) - 1px) 0, 100% 0, 100% calc(100% - var(--c) + 1px), calc(100% - var(--c) + 1px) 100%, 0 100%, 0 calc(var(--c) - 1px)); background: linear-gradient(180deg, rgba(10, 6, 12, .97), rgba(6, 5, 10, .97)); }
.cut-sm { --c: 14px; }
.home-panel.cut { background: linear-gradient(160deg, #ff2438 0%, #5a0b14 30%, #1c0c14 60%, #3a1020 85%, #ff2438 100%); }
.cut-h { display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 24px; font-family: var(--head); font-size: 28px; font-weight: 500; letter-spacing: .6px; text-transform: uppercase; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); margin: 0 18px; padding-left: 4px; }
.slashes { font-style: italic; font-weight: 700; color: var(--red-neon); letter-spacing: -2px; text-shadow: 0 0 10px var(--red-neon); }
.play-body { padding: 16px 22px 22px; gap: 12px; }
.field-label { font-family: var(--head); font-size: 20px; font-weight: 500; letter-spacing: 1px; color: #cfd5e0; }
.name-field { display: flex; align-items: center; gap: 14px; height: 54px; padding: 0 16px; border: 1px solid #3a3f4e; border-radius: 6px; background: #07080e; transition: border-color .15s, box-shadow .15s; }
.name-field:focus-within { border-color: var(--red-neon); box-shadow: 0 0 0 3px rgba(255, 36, 56, .15); }
.name-field [data-icon] { font-size: 24px; color: #e6eaf2; }
.name-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: 19px; font-weight: 600; color: #fff; }
.name-field input.shake { animation: shake .4s; }
.play-cards { gap: 16px; margin-top: 6px; }
.play-card.cut-sm { padding: 18px; border: 0; background: linear-gradient(160deg, #ff2438, #4a0a12 50%, #ff2438); gap: 6px; }
.play-card.cut-sm::before { background: rgba(8, 6, 11, .98); inset: 1.5px; }
.play-card:hover, .play-card.focus { border-color: transparent; }
.play-card.focus::before { background: rgba(22, 6, 11, .98); }
.pc-title { white-space: nowrap; font-family: var(--head); font-size: 25px; font-weight: 500; letter-spacing: .5px; }
.pc-title [data-icon] { color: var(--red-neon); font-size: 24px; }
.play-card p { font-size: 15px; color: #c5ccd8; }
.btn-cta { height: 50px; font-family: var(--head); font-size: 24px; font-weight: 600; letter-spacing: 1px; border-radius: 4px; }
.btn-red { background: linear-gradient(180deg, #ff2a3c, #a50d1b); border-color: #ff6b77; box-shadow: 0 0 18px rgba(255, 36, 56, .45); }
.btn-blue { background: linear-gradient(180deg, #1f6ef0, #0b3fae); border-color: #5d9bff; box-shadow: 0 0 16px rgba(40, 110, 255, .4); }
.code-input { height: 50px; font-family: var(--head); font-size: 24px; letter-spacing: 6px; border-color: #3a3f4e; background: #07080e; border-radius: 4px; }
.code-input::placeholder { letter-spacing: 1px; font-size: 18px; color: #6c7384; }
.code-row .btn { width: 104px; height: 50px; }
.play-banner { width: 100%; aspect-ratio: auto; height: auto; margin-top: 8px; border-radius: 6px; border: 1px solid #2a2230; }
.home-tab .config-body, .home-tab .rules-body { padding: 10px 22px 22px; }

/* ====================================================== PROTOCOLO — sala (v3) */
#screen-room { background: radial-gradient(ellipse 40% 30% at 80% 0%, rgba(255, 30, 50, .12), transparent 70%); }
.topbar { background: linear-gradient(180deg, rgba(3, 3, 7, .98), rgba(6, 5, 10, .9)); border-bottom: 1px solid #2a1720; box-shadow: 0 1px 0 rgba(255, 36, 56, .25); }
.top-logo { height: 52px; -webkit-mask-image: none; mask-image: none; }
.top-slogan { font-family: var(--head); font-size: 18px; letter-spacing: .28em; color: #c5ccd8; }
.panel { border-color: #2a2130; background: rgba(9, 8, 14, .9); }
.panel-h { font-family: var(--head); font-size: 22px; font-weight: 500; letter-spacing: .8px; color: #f0f2f7; }
.panel-h > [data-icon]:first-child { color: var(--red-neon); }
.panel-h::before { content: '//'; font-style: italic; font-weight: 700; color: var(--red-neon); letter-spacing: -2px; margin-right: -2px; text-shadow: 0 0 8px var(--red-neon); }
.panel-h > [data-icon]:first-child { display: none; }
.phase-pill { font-family: var(--head); font-size: 22px; font-weight: 500; background: rgba(255, 36, 56, .08); border-color: rgba(255, 36, 56, .5); color: #ffe1e4; }
.btn { font-family: var(--head); font-size: 20px; font-weight: 600; }
.btn-xl { font-size: 23px; }
.m-title, .pc-title, .choice, .chosen, .ov-title, .result-big, .end-title, .end-team, .verdict, .invite-code, .ring .num, .mnode .ms, .prog-box .pv, .prog-box .pt, .role-name, .flip-front .ff-role, .flip-back .fb-t, .room-chip, .comp-big b, .hist-round > header { font-family: var(--head); font-weight: 600; }
.m-title { font-size: clamp(34px, 4.2vh, 50px); }
.choice { font-size: 28px; }
.croc-tip::before { content: 'DICA DO AGENTE'; }
.flip-back { background: radial-gradient(circle at 50% 30%, #3a0910, #06040a 70%); }
.flip-back img { width: 240px; filter: drop-shadow(0 0 20px rgba(0, 0, 0, .8)); }
.croc-corner img { object-position: center bottom; }

/* menu inicial em notebooks (até 1500px) */
@media (max-width: 1500px) {
  #screen-home.active { grid-template-columns: 300px minmax(0, 1fr); }
  .home-side { padding: 20px 22px 26px; }
  .home-slogan { font-size: 16px; letter-spacing: .12em; white-space: normal; }
  .menu-btn { font-size: 21px; height: 48px; padding-left: 18px; }
  .menu-btn .mi { font-size: 20px; width: 26px; }
  .menu-btn.primary { height: 58px; font-size: 22px; }
  .badge-online { font-size: 13px; line-height: 20px; padding: 0 6px; }
  .home-tagline { font-size: 17px; letter-spacing: .16em; }
  .home-panel.cut { width: min(620px, 54vw); }
  .cut-h { font-size: 23px; height: 52px; }
  .pc-title { font-size: 20px; white-space: normal; }
  .play-card p { font-size: 13px; }
  .btn-cta, .code-input, .code-row .btn { height: 44px; font-size: 19px; }
  .code-row .btn { width: 86px; }
  .code-input::placeholder { font-size: 14px; }
  .name-field { height: 46px; }
  .home-hero { height: 76vh; right: -4vw; }
  .home-planet { width: 64vw; height: 64vw; right: -30vw; }
}
@media (max-height: 820px) {
  .home-logo { max-width: 300px; }
  .home-menu { margin-top: 22px; }
  .play-body { gap: 9px; padding: 12px 18px 16px; }
}
