/* KickOff 2027 - mini jogos (#/jogos) e explorar o hotel (#/explorar). Usa as variaveis de styles.css. */

/* ---------- mini jogos ---------- */
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.g-tile { display: flex; flex-direction: column; gap: 8px; color: var(--text); text-decoration: none; }
.g-tile:hover { border-color: var(--cyan); }
.g-tile p { flex: 1; }
.g-tile .btn { align-self: flex-start; }
.g-stage { gap: 12px; }
.g-intro { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.g-score { font-size: 64px; font-weight: 800; line-height: 1; color: var(--cyan); }
.g-score small { font-size: 24px; font-weight: 300; }
.g-hud { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.g-time i { background: var(--cyan); transition: width 1s linear; }
.g-time i.low { background: var(--orange); }
.g-q { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.g-q h2 { font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
.g-opts { display: flex; flex-direction: column; gap: 8px; }
.g-opts.grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.g-opt {
  font: 600 15px var(--sans); color: var(--text); text-align: left; line-height: 1.35;
  background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 13px 14px; cursor: pointer; min-height: 48px;
}
.g-opts.grid .g-opt { text-align: center; }
.g-opt:hover:not(:disabled) { border-color: var(--cyan); }
.g-opt:disabled { cursor: default; opacity: 0.55; }
.g-opt.right { border-color: var(--ok); background: var(--ok-tint); opacity: 1; }
.g-opt.wrong { border-color: var(--orange); background: var(--orange-tint); opacity: 1; }
.g-opt.partial { border-color: var(--cyan); background: var(--blue-tint); opacity: 1; }
.g-fb { display: flex; flex-direction: column; gap: 8px; min-height: 24px; }
.g-miss { color: var(--orange); font-weight: 600; font-size: 14px; }
.g-canvas { width: 100%; height: auto; background: #060914; border-radius: var(--radius); } /* tela de equipamento: o desenho em jogos.js e para fundo escuro */
.g-range { font-size: 14px; }
.g-range output { color: var(--cyan); font-family: var(--mono); font-weight: 700; }
.g-range input { padding: 0; accent-color: var(--cyan); height: 32px; background: transparent; border: 0; }
.g-read { margin-top: 0; }
.g-read b { font-size: 16px; font-family: var(--mono); }
.g-mem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.g-card {
  aspect-ratio: 3 / 4; min-height: 96px; padding: 6px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--blue); color: var(--text); font: 600 12px/1.25 var(--sans);
  background: var(--blue) radial-gradient(circle at 50% 0, rgba(62, 200, 255, 0.45), transparent 70%);
  display: grid; place-items: center; text-align: center; overflow: hidden; overflow-wrap: anywhere;
}
.g-card span { visibility: hidden; }
.g-card.open, .g-card.ok { background: var(--surface); }
.g-card.open span, .g-card.ok span { visibility: visible; }
.g-card.nome.open, .g-card.nome.ok { color: var(--cyan); font-size: 13px; }
.g-card.open { border-color: var(--cyan); }
.g-card.ok { border-color: var(--ok); cursor: default; }
@media (min-width: 700px) { .g-card { font-size: 14px; } .g-card.nome.open, .g-card.nome.ok { font-size: 16px; } }

/* ---------- explorar o hotel ---------- */
.x-map .map-inner { min-width: 980px; }
.x-map.moving .map-inner { cursor: crosshair; outline: 2px dashed var(--orange); outline-offset: -2px; }
.x-pin {
  position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; padding: 0; border-radius: 50%;
  background: var(--orange); color: #FFFFFF; border: 2px solid #FFFFFF; font: 700 11px var(--mono); cursor: pointer;
  box-shadow: 0 2px 6px rgba(11, 12, 14, 0.4);
}
.x-pin:hover, .x-pin:focus-visible { z-index: 2; transform: translate(-50%, -50%) scale(1.25); }
.x-pin.done { background: var(--ok) var(--check-white) center / 14px no-repeat; }
.x-map.moving .x-pin { pointer-events: none; opacity: 0.6; }
.x-place.done { opacity: 0.75; }
.x-place.done .num { background: var(--ok) var(--check-white) center / 14px no-repeat; }
.x-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.x-badge {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px 10px;
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.x-badge b { font-size: 14px; }
.x-medal { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); color: var(--muted); margin-bottom: 4px; }
.x-medal svg { width: 28px; height: 28px; }
.x-badge.on { border-style: solid; border-color: var(--cyan); }
.x-badge.on .x-medal { background: var(--cyan); border-color: var(--cyan); color: var(--on-accent); }
.x-badge.on .mono { color: var(--ok); }
.x-badge:not(.on) b, .x-badge:not(.on) .small { opacity: 0.7; }
.x-dialog .x-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.x-dialog h2 { margin-bottom: 6px; }

/* ---------- rede de conexoes (#/rede) ---------- */
.n-me { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.n-me img.qr { margin: 4px auto; }
.n-code { font-size: 20px; }
.n-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.n-stats div { background: var(--surface); padding: 10px 4px; text-align: center; }
.n-stats b { display: block; font: 700 16px var(--mono); font-variant-numeric: tabular-nums; }
.n-stats span { font-size: 11px; color: var(--muted); }
.n-person { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; margin: 10px 0 4px; }
.n-person h2 { margin: 0; }
.n-scan { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 1; margin-bottom: 10px; }
.n-scan video { width: 100%; height: 100%; object-fit: cover; }
.n-scan::after { content: ''; position: absolute; inset: 14%; border: 3px solid var(--cyan); border-radius: 16px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.35); }
.n-graph { position: relative; border-radius: var(--radius); overflow: hidden; background: #060914 radial-gradient(circle at 50% 45%, rgba(62, 200, 255, 0.1), transparent 65%); }
.n-canvas { display: block; width: 100%; height: min(68vh, 620px); touch-action: manipulation; }
.n-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); pointer-events: none; }
.n-empty[hidden], .n-info[hidden], .n-wall-news[hidden] { display: none; }
.n-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.n-chip { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--sans); color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer; }
.n-chip i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.n-chip.on { border-color: var(--blue); background: var(--blue-tint); }
.n-info { display: flex; flex-direction: column; gap: 8px; }
.n-info-head { display: flex; align-items: center; gap: 12px; }
.n-info-head .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.n-mode { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; padding-right: 10px; border-right: 1px solid var(--line); }
.n-km { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.n-km b { font-size: 22px; font-weight: 800; color: var(--cyan); }
.n-km span { font-size: 13px; color: var(--muted); }
.n-far { display: flex; flex-direction: column; gap: 4px; }
.n-far[hidden], section[hidden] { display: none; }
.n-far-km { font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--cyan); }
.rank-row .pts { font-size: 13px; }
details.card summary { cursor: pointer; font-weight: 600; }

/* telao (#/rede/telao): cobre a tela inteira, para projetar no encerramento */
.n-wall { position: fixed; inset: 0; z-index: 40; overflow: hidden; background: #060914 radial-gradient(circle at 45% 55%, rgba(62, 200, 255, 0.12), transparent 60%); }
.n-wall .n-canvas { position: absolute; inset: 0; height: 100%; }
.n-wall-head { position: absolute; left: 32px; top: 26px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.n-wall-head h1 { font-size: clamp(28px, 4vw, 54px); }
.n-kpis { display: flex; gap: clamp(16px, 3vw, 40px); }
.n-kpis b { display: block; font-size: clamp(28px, 3.4vw, 52px); font-weight: 800; line-height: 1; color: var(--cyan); }
.n-kpis span { font-size: 13px; color: var(--muted); }
.n-wall-top { position: absolute; right: 32px; top: 84px; width: min(340px, 30vw); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.n-wall-top .rank-row { background: rgba(16, 22, 46, 0.86); padding: 8px 12px; }
.n-wall-top .rank-row .grow span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-wall-top .rank-row .pts { font-size: 18px; }
.n-wall-top .n-far { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(16, 22, 46, 0.86); }
.n-wall-legend { position: absolute; left: 32px; right: 32px; bottom: 24px; }
.n-wall-actions { position: absolute; right: 24px; top: 20px; display: flex; gap: 8px; }
.n-wall-news { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); background: var(--orange); color: #14171A; font-weight: 700; font-size: clamp(15px, 1.6vw, 22px); padding: 10px 20px; border-radius: 999px; white-space: nowrap; animation: pop 0.25s ease-out; }
@media (max-width: 900px) {
  .n-wall-top { display: none; }
  .n-wall-head { left: 16px; top: 64px; }
  .n-wall-legend { left: 16px; right: 16px; bottom: 16px; }
}

/* ---------- Esmague a Concorrência (sala de exames) ---------- */
.w-room { position: relative; width: 100%; max-width: 480px; margin: 0 auto; aspect-ratio: 9 / 10; max-height: 62vh; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.w-room > svg, .w-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.w-gl { touch-action: manipulation; }
.w-layer { position: absolute; inset: 0; pointer-events: none; }
.w-pop {
  --ty: -50%; --sx: 1; --sy: 1;
  position: absolute; transform: translate(-50%, var(--ty)) scale(var(--sx), var(--sy)); transform-origin: 50% 100%;
  width: 43%; min-height: 56px; padding: 7px 9px 9px; pointer-events: auto;
  border: 2px solid #14171A; border-radius: 14px; font: 700 14px/1.2 var(--sans); color: #14171A; text-align: center;
  cursor: pointer; touch-action: manipulation; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.14s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
  animation: w-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes w-in { from { opacity: 0; transform: translate(-50%, var(--ty)) scale(0.6); } }
.w-room.gl .w-pop { --ty: -100%; margin-top: -10px; }
.w-room.gl .w-pop::after { content: ''; position: absolute; left: var(--tail, 50%); bottom: -9px; width: 14px; height: 14px; margin-left: -7px; background: inherit; border: solid #14171A; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.w-pop small { display: block; font: 700 11px var(--sans); opacity: 0.7; margin-bottom: 3px; }
.w-pop.myth { background: #FFFFFF; }
.w-pop.fact { background: var(--logo-cyan); }
.w-pop:disabled { cursor: default; }
.w-pop.hit { background: #5FD38D; font: 800 22px var(--mono); --sx: 1.1; --sy: 0.6; }
.w-pop.oops { background: var(--logo-orange); font: 800 22px var(--mono); }
.w-pop.gone { opacity: 0; --sx: 0.8; --sy: 0.8; }
.w-say { min-height: 44px; }

/* ---------- Cobrinha do Z20 (tela cheia) ---------- */
.s-full { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: #04060A; color: var(--text); touch-action: none; overscroll-behavior: contain; user-select: none; -webkit-user-select: none; }
.s-hud { box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 12px; padding: calc(8px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 6px calc(14px + env(safe-area-inset-left)); }
.s-score { min-width: 6.5ch; font: 700 22px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--cyan); }
.s-got { display: flex; align-items: center; gap: 8px; font: 600 12px var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.s-pips { display: flex; gap: 3px; }
.s-pips i { width: 6px; height: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #5A626C; transition: background-color 0.3s, box-shadow 0.3s; }
.s-pips i.on { background: var(--orange); box-shadow: none; }
.s-pips.all i { animation: s-pip 0.6s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i) * 35ms); }
@keyframes s-pip { 35% { transform: scale(1.9); } }
.s-hud [data-quit] { margin-left: auto; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border-color: var(--line-strong, #3A4048); background: none; }
.s-field { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.s-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.s-tag { position: absolute; left: 0; top: 0; z-index: 2; font: 700 12px/1 var(--sans); letter-spacing: 0.01em; color: #FFFFFF; background: rgba(8, 11, 15, 0.88); border: 1.5px solid var(--orange); border-radius: 999px; padding: 5px 9px; white-space: nowrap; pointer-events: none; will-change: transform; }
.s-tag[hidden] { display: none; }
.s-pop { position: absolute; z-index: 1; translate: -50% -50%; font: 800 20px/1 var(--mono); color: var(--orange); background: rgba(8, 11, 15, 0.88); border-radius: 999px; padding: 5px 10px; white-space: nowrap; pointer-events: none; animation: s-pop 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.s-pop.big { font-size: 26px; padding: 7px 14px; color: var(--on-accent, #0B0C0E); background: var(--orange); animation-duration: 1.2s; }
@keyframes s-pop { 55% { opacity: 1; } to { opacity: 0; translate: -50% calc(-50% - 40px); } }
.s-toast { box-sizing: border-box; width: 100%; max-width: 640px; margin: 0 auto; padding: 8px 16px calc(12px + env(safe-area-inset-bottom)); display: grid; gap: 2px; text-align: center; text-wrap: balance; pointer-events: none; }
.s-toast b { font-size: 15px; font-weight: 700; line-height: 1.25; }
.s-toast span { min-height: 2.7em; font-size: 13px; line-height: 1.35; color: var(--muted); }
.s-toast.in { animation: s-say 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes s-say { from { opacity: 0; transform: translateY(6px); } }
@keyframes s-fade { to { opacity: 0; } }
@media (min-width: 900px) {
  .s-hud { max-width: 1120px; margin: 0 auto; gap: 18px; padding-top: 14px; }
  .s-score { font-size: 28px; }
  .s-got { font-size: 13px; }
  .s-pips { gap: 5px; }
  .s-pips i { width: 8px; height: 8px; }
  .s-toast b { font-size: 17px; }
  .s-toast span { min-height: 1.4em; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .s-toast.in, .s-pips.all i { animation: none; }
  .s-pop, .s-pop.big { animation: s-fade 0.9s linear forwards; }
  .s-pips i { transition: none; }
}
