/* =====================================================================
   Biblioteca de jogos (tela Jogar), tela de carregamento e ícones próprios.
   Carregado depois de style.css e hud.css. Sem emoji: ícones são <svg><use href="#..."></svg> do index.html.
   Materiais: madeira escura, latão envelhecido, papel de carta. Pouco brilho.
   ===================================================================== */
:root {
  --m-ink: #efe2c4;
  --m-ink-dim: #b8a37e;
  --m-brass: #c49a52;
  --m-brass-dim: #7d5e2c;
  --m-line: rgba(196, 154, 82, .2);
}
/* naipes e coroa sempre como texto (nunca como emoji colorido) */
body { font-variant-emoji: text; }

/* ícones: herdam a cor e o tamanho do texto */
.ic { width: 1em; height: 1em; display: inline-block; flex: none; vertical-align: -.14em; overflow: visible; }
.menu-card .ico .ic { width: 18px; height: 18px; }
.pz-ico .ic { width: 15px; height: 15px; }
#room-players .who .ic, #tab-list .who .ic { width: 15px; height: 15px; margin-right: 7px; vertical-align: -2px; color: var(--m-ink-dim); }

/* =====================================================================
   JOGAR = BIBLIOTECA DE JOGOS
   Bluff Bar → Escolher jogo → (lista) → jogo escolhido → Escolha o modo → Jogar
   ===================================================================== */
.lib { gap: 0; padding: 4.5vh 3.4vw 3.6vh; width: min(540px, 100%); scrollbar-width: none; }
.lib::-webkit-scrollbar { display: none; }
.lib-head { margin-bottom: 2.6vh; }
.lib-brand { margin: 0 0 2px 3px; font: 400 15px 'Rye', serif; letter-spacing: .26em; text-transform: uppercase; color: var(--m-brass); text-shadow: 0 2px 0 #000; }
.lib-brand b { font-weight: 400; color: var(--m-ink); }
.lib-title { margin: 0; white-space: nowrap; font: 400 clamp(34px, 3.3vw, 50px)/1 'Permanent Marker', sans-serif; color: #fffaf0; text-transform: uppercase;
  transform: rotate(-3deg); transform-origin: left; text-shadow: 0 4px 0 #000, 0 0 26px rgba(0, 0, 0, .6); }

/* lista de jogos: linhas de um cardápio, não cartões */
.lib-games { display: flex; flex-direction: column; border-top: 1px solid var(--m-line); }
.lib-game {
  position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px;
  padding: 11px 12px 11px 14px; border: 0; border-bottom: 1px solid var(--m-line); background: none; color: var(--m-ink);
  text-align: left; cursor: pointer; transition: background .25s, padding .25s;
}
.lib-game::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--m-brass); transform: scaleY(0); transition: transform .25s; }
.lib-art {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--m-ink);
  background: radial-gradient(circle at 40% 32%, #3a2414, #1a0f08 70%);
  box-shadow: inset 0 0 0 1px rgba(196, 154, 82, .5), inset 0 0 0 4px rgba(0, 0, 0, .35), 0 3px 8px rgba(0, 0, 0, .5);
  transition: box-shadow .25s, color .25s;
}
.lib-art .ic { width: 24px; height: 24px; }
.lib-gname { font: 400 20px/1.12 'Rye', serif; letter-spacing: .04em; text-transform: uppercase; text-shadow: 0 2px 0 #000; }
.lib-mark { width: 7px; height: 7px; margin-right: 4px; background: var(--m-brass); transform: rotate(45deg) scale(0); transition: transform .25s; box-shadow: 0 0 0 2px rgba(0, 0, 0, .5); }
.lib-game:not(.soon):hover, .lib-game:not(.soon):focus-visible { outline: none; background: linear-gradient(90deg, rgba(196, 154, 82, .08), transparent 85%); }
.lib-game.active { background: linear-gradient(90deg, rgba(196, 154, 82, .17), rgba(196, 154, 82, .03) 70%, transparent); }
.lib-game.active::before { transform: none; }
.lib-game.active .lib-art { color: #f6e3b4; box-shadow: inset 0 0 0 1.5px var(--m-brass), inset 0 0 0 4px rgba(0, 0, 0, .35), 0 3px 10px rgba(0, 0, 0, .55); }
.lib-game.active .lib-mark { transform: rotate(45deg); }
/* em breve: está na prateleira, mas ainda fechado */
.lib-game.soon { cursor: url("../assets/ui/cursor.svg") 3 2, not-allowed; }
.lib-game.soon .lib-gname { color: rgba(239, 226, 196, .42); }
.lib-game.soon .lib-art { color: rgba(239, 226, 196, .38); background: radial-gradient(circle at 40% 32%, #241810, #120a06 70%); box-shadow: inset 0 0 0 1px rgba(196, 154, 82, .2), 0 3px 8px rgba(0, 0, 0, .4); }
.lib-soon { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 7px; border: 1px solid rgba(184, 163, 126, .3); border-radius: 2px;
  font: 400 11px 'Oswald', sans-serif; letter-spacing: .24em; text-transform: uppercase; color: var(--m-ink-dim); white-space: nowrap; }
.lib-soon .ic { width: 12px; height: 12px; opacity: .8; }
.lib-game.nope { animation: lib-nope .4s ease; }
@keyframes lib-nope { 20% { transform: translateX(-5px); } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } }

/* jogo escolhido → modo → jogar */
.lib-detail { margin-top: 3.2vh; }
.lib-game-head { display: flex; align-items: center; gap: 14px; }
.lib-game-head .lib-art { width: 50px; height: 50px; color: #f6e3b4; box-shadow: inset 0 0 0 1.5px var(--m-brass), inset 0 0 0 5px rgba(0, 0, 0, .35), 0 4px 10px rgba(0, 0, 0, .55); }
.lib-game-head .lib-art .ic { width: 27px; height: 27px; }
#lib-name { margin: 0; font: 400 clamp(38px, 4vw, 54px)/1 'Permanent Marker', sans-serif; color: var(--m-ink); text-transform: uppercase;
  transform: rotate(-2deg); text-shadow: 0 4px 0 #000, 0 0 22px rgba(0, 0, 0, .55); }
.lib-label { display: flex; align-items: center; gap: 12px; margin: 2.2vh 0 1.1vh; font: 400 12px 'Oswald', sans-serif; letter-spacing: .32em; text-transform: uppercase; color: var(--m-brass); }
.lib-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--m-line), transparent); }

/* modos: uma régua só, dividida em três (não três cartões) */
#mode-pick.lib-modes { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 0; border: 1px solid rgba(196, 154, 82, .3); border-radius: 3px;
  background: rgba(8, 5, 3, .5); box-shadow: inset 0 1px 0 rgba(255, 230, 180, .04), 0 6px 16px rgba(0, 0, 0, .35); }
.lib-mode {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 13px 6px 11px; border: 0; background: none; cursor: pointer;
  color: var(--m-ink-dim); font: 400 14px 'Oswald', sans-serif; letter-spacing: .22em; text-transform: uppercase; transition: background .25s, color .25s;
}
.lib-mode + .lib-mode { border-left: 1px solid rgba(196, 154, 82, .18); }
.lib-mode .ic { width: 30px; height: 30px; opacity: .75; transition: color .25s, opacity .25s, transform .25s; }
.lib-mode:hover, .lib-mode:focus-visible { outline: none; color: var(--m-ink); background: rgba(196, 154, 82, .06); }
.lib-mode.active { color: var(--m-ink); background: linear-gradient(180deg, rgba(196, 154, 82, .2), rgba(196, 154, 82, .04)); box-shadow: inset 0 -2px 0 var(--m-brass); }
.lib-mode.active .ic { color: #f0d699; opacity: 1; }
.lib-mode.mode-devil.active .ic { color: #e0573f; }
.lib-mode.picked .ic { animation: lib-pick .4s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes lib-pick { 0% { transform: scale(.8) rotate(-8deg); } 100% { transform: none; } }

/* formas de jogar */
.lib-play { display: grid; gap: 12px; margin-top: 3vh; }
.lib-go { position: relative; display: flex; cursor: pointer; text-align: left; transition: transform .2s, filter .2s, border-color .2s, box-shadow .2s; }
/* JOGAR: uma carta de papel, como as do menu inicial */
.lib-go.primary {
  flex-direction: column; justify-content: center; padding: 12px 26px 13px; min-height: 76px; border-radius: 4px; color: #23160d;
  background: linear-gradient(170deg, #f8f0dc, #e6d3a9); border: 1px solid #5f4522;
  box-shadow: inset 0 0 0 4px #f4e9cf, inset 0 0 0 5px rgba(130, 90, 40, .45), 0 4px 0 #4e3819, 0 14px 24px rgba(0, 0, 0, .5);
}
.lib-go.primary::before, .lib-go.primary::after { content: attr(data-suit); position: absolute; font: 400 14px 'Rye', serif; color: #7a1b16; opacity: .75; }
.lib-go.primary::before { left: 10px; top: 6px; }
.lib-go.primary::after { right: 10px; bottom: 6px; transform: rotate(180deg); }
.lib-go.primary .lg-label { font: 400 34px/1 'Permanent Marker', sans-serif; text-transform: uppercase; letter-spacing: .02em; }
.lib-go.primary .lg-sub { margin-top: 3px; font: 400 13px 'Oswald', sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #6b5233; }
.lib-go.primary:hover, .lib-go.primary:focus-visible { outline: none; transform: translate(4px, -2px) rotate(-.4deg); filter: brightness(1.04);
  box-shadow: inset 0 0 0 4px #f4e9cf, inset 0 0 0 5px rgba(130, 90, 40, .55), 0 6px 0 #4e3819, 0 18px 28px rgba(0, 0, 0, .55); }
.lib-go.primary:active { transform: translate(4px, 1px); }
/* JOGAR ONLINE: secundário, só o contorno */
.lib-go.online { align-items: center; gap: 12px; padding: 13px 18px; border-radius: 3px; color: var(--m-ink); background: rgba(12, 7, 4, .6); border: 1px solid rgba(196, 154, 82, .4); }
.lib-go.online .ic { width: 20px; height: 20px; color: var(--m-brass); }
.lib-go.online .lg-label { font: 600 15px 'Oswald', sans-serif; letter-spacing: .22em; text-transform: uppercase; }
.lib-go.online:hover, .lib-go.online:focus-visible { outline: none; border-color: var(--m-brass); transform: translateX(4px); background: rgba(30, 18, 8, .7); }

/* rodapé: Ajuda e Voltar */
.lib .play-foot { margin-top: 3.4vh; gap: 28px; }
.foot-btn .ic { width: 18px; height: 18px; margin-right: 8px; vertical-align: -4px; }

@media (max-height: 760px) {
  .lib { padding-top: 3vh; }
  .lib-head { margin-bottom: 1.6vh; }
  .lib-game { padding-top: 8px; padding-bottom: 8px; }
  .lib-art { width: 38px; height: 38px; }
  .lib-game { grid-template-columns: 38px 1fr auto; }
  .lib-detail { margin-top: 2.2vh; }
  .lib-go.primary { min-height: 64px; }
}

/* online: os três modos numa régua só */
#create-mode button, #lobby-game button { min-width: 0; }
#create-game { font: 400 18px 'Rye', serif; color: var(--m-ink); letter-spacing: .06em; text-transform: uppercase; }

/* =====================================================================
   CARREGAMENTO — sóbrio: o bar bem desfocado ao fundo, o logo, uma linha fina de progresso com o que está
   acontecendo e a porcentagem, e uma dica discreta embaixo. Nada se mexe além da barra (e um leve zoom no fundo).
   ===================================================================== */
#loading { overflow: hidden; background: #060403; transition: opacity .8s ease; }
#loading.out { opacity: 0; pointer-events: none; }
#loading::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 75% 65% at 50% 45%, rgba(6, 4, 3, .3) 0%, rgba(6, 4, 3, .8) 62%, #060403 100%); }
.ld-bg { position: absolute; inset: -40px; background: #140b06 url(../assets/ui/loading_bg.jpg) center / cover;
  filter: blur(14px) brightness(.3) saturate(.9); transform: scale(1.04); animation: ld-breathe 30s ease-in-out infinite alternate; }
@keyframes ld-breathe { to { transform: scale(1.1); } }
.ld-center { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; margin-top: -4vh; }
.ld-logo { align-self: center; margin-bottom: 7vh; animation: ld-in 1s cubic-bezier(.2, .9, .3, 1) both; }
.ld-progress { width: min(360px, 72vw); animation: ld-in 1s .2s ease both; }
@keyframes ld-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ld-rail { position: relative; height: 2px; overflow: hidden; border-radius: 2px; background: rgba(239, 226, 196, .12); }
#load-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; transition: width .35s ease-out;
  background: linear-gradient(90deg, #8a6a34, #e2c07a); box-shadow: 0 0 10px rgba(226, 192, 122, .45); }
.ld-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 12px;
  font: 400 12px 'Oswald', sans-serif; letter-spacing: .24em; text-transform: uppercase; }
.ld-msg { color: var(--m-ink-dim); transition: opacity .35s; }
.ld-msg.swap { opacity: 0; }
.ld-pct { color: var(--m-brass); letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.ld-tip { position: absolute; z-index: 2; left: 50%; bottom: 6vh; transform: translateX(-50%); width: min(560px, 88vw); margin: 0; text-align: center;
  font: 400 15px/1.4 'Oswald', sans-serif; letter-spacing: .03em; color: rgba(239, 226, 196, .58); text-shadow: 0 2px 6px #000; transition: opacity .5s; }
.ld-tip b { margin-right: 12px; font-weight: 400; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--m-brass); }
.ld-tip.swap { opacity: 0; }
/* saída: o centro sobe e some enquanto o bar aparece */
#loading.out .ld-center { opacity: 0; transform: translateY(-10px); transition: opacity .6s ease, transform .8s ease; }
#loading.out .ld-tip { opacity: 0; transition: opacity .6s ease; }
@media (max-height: 560px) { .ld-logo { margin-bottom: 3vh; transform: scale(.8); } }

/* =====================================================================
   ESCOLHA DO BARALHO (Truco, Pobre Rico Milionário) — duas opções com um leque de cartas de amostra
   ===================================================================== */
#deck-pick { background: radial-gradient(ellipse at 50% 45%, rgba(10, 6, 3, .7), rgba(3, 2, 1, .9)); backdrop-filter: blur(3px); }
#deck-pick .deck-panel { width: min(620px, 100%); padding: 28px 32px 18px; text-align: center; border: 1px solid rgba(196, 154, 82, .35); border-radius: 4px;
  background: linear-gradient(180deg, rgba(26, 16, 9, .97), rgba(12, 7, 4, .97)); box-shadow: 0 30px 80px rgba(0, 0, 0, .7), inset 0 0 0 4px rgba(0, 0, 0, .35); }
#deck-game { margin: 0 0 6px; }
#deck-title { margin: 0 0 22px; font: 400 clamp(30px, 3.4vw, 42px)/1 'Permanent Marker', sans-serif; color: var(--m-ink); text-transform: uppercase; text-shadow: 0 3px 0 #000; }
.deck-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.deck-opt { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 18px 12px 16px; border: 1px solid rgba(196, 154, 82, .22); border-radius: 4px;
  background: rgba(0, 0, 0, .28); color: var(--m-ink); transition: border-color .2s, background .2s, transform .2s; }
.deck-opt:hover, .deck-opt:focus-visible { outline: none; border-color: rgba(196, 154, 82, .65); background: rgba(196, 154, 82, .07); transform: translateY(-2px); }
.deck-opt.active { border-color: var(--m-brass); background: linear-gradient(180deg, rgba(196, 154, 82, .16), rgba(196, 154, 82, .03)); box-shadow: inset 0 -2px 0 var(--m-brass); }
.deck-fan { position: relative; width: 180px; height: 132px; margin-bottom: 10px; }
.deck-fan > * { position: absolute; left: 50%; bottom: 0; width: 78px; height: auto; margin-left: -39px; border-radius: 6px; box-shadow: 0 6px 14px rgba(0, 0, 0, .6);
  transform-origin: 50% 130%; transition: transform .3s cubic-bezier(.2, .9, .3, 1.2); }
.deck-fan > :nth-child(1) { transform: rotate(-15deg); }
.deck-fan > :nth-child(3) { transform: rotate(15deg); }
.deck-opt:hover .deck-fan > :nth-child(1), .deck-opt:focus-visible .deck-fan > :nth-child(1) { transform: rotate(-21deg); }
.deck-opt:hover .deck-fan > :nth-child(3), .deck-opt:focus-visible .deck-fan > :nth-child(3) { transform: rotate(21deg); }
.deck-opt b { font: 400 22px 'Rye', serif; letter-spacing: .06em; }
.deck-opt small { font: 400 12px 'Oswald', sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--m-ink-dim); }
.deck-note { margin: 16px 0 4px; font: 400 14px 'Oswald', sans-serif; letter-spacing: .04em; color: var(--m-ink-dim); }
.deck-foot { display: flex; justify-content: center; }
@media (max-width: 520px) { .deck-opts { grid-template-columns: 1fr; } .deck-fan { height: 112px; } .deck-fan > * { width: 66px; margin-left: -33px; } }

/* versão e autoria: canto inferior direito do menu inicial, bem discreto */
#build-info { position: absolute; right: 28px; bottom: 22px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; pointer-events: none;
  text-shadow: 0 1px 3px #000; }
#build-version { font: 400 13px 'Oswald', sans-serif; letter-spacing: .22em; color: var(--m-brass); font-variant-numeric: tabular-nums; }
#build-info .by { font: 400 12px 'Oswald', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--m-ink-dim); }
/* no menu inicial a versão já diz "DEV": a marca solta do canto some ali */
body:has(#menu:not(.hidden)) #dev-badge { display: none; }

/* =====================================================================
   Navegação secundária (telas online): um componente só, .nav-btn
     .nav-back  — "Voltar": navegação neutra
     .nav-exit  — "Sair da sala": abandonar (mesma peça, borda e ícone em cobre escuro)
   Sempre num rodapé (.on-foot) separado por um filete: nunca compete com a ação principal.
   ===================================================================== */
.on-foot { display: flex; justify-content: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(196, 154, 82, .16); position: relative; }
.on-foot::before { content: '♠'; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); padding: 0 10px; font: 400 11px/16px 'Rye', serif; color: var(--m-brass-dim);
  background: #170d07; }
.nav-btn {
  --nb-edge: rgba(196, 154, 82, .45); --nb-edge-hi: var(--m-brass); --nb-icon: var(--m-brass); --nb-tint: rgba(196, 154, 82, .1);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 42px; min-width: 168px; padding: 0 18px 0 14px;
  border: 1px solid var(--nb-edge); border-radius: 3px; cursor: pointer; isolation: isolate;
  color: rgba(239, 226, 196, .88); font: 600 14px/1 'Oswald', sans-serif; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(rgba(22, 12, 6, .84), rgba(10, 5, 3, .92)), var(--wood) center / 320px;
  box-shadow: inset 0 1px 0 rgba(255, 225, 170, .07), inset 0 0 0 2px rgba(0, 0, 0, .35), 0 2px 0 #0b0503, 0 6px 12px rgba(0, 0, 0, .35);
  transition: border-color .2s, color .2s, transform .18s, box-shadow .2s;
}
/* luz quente que acende por dentro no hover */
.nav-btn::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity .25s;
  background: radial-gradient(ellipse 80% 120% at 50% 0%, var(--nb-tint), transparent 70%); }
.nav-btn .ic { width: 17px; height: 17px; color: var(--nb-icon); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.nav-btn kbd { margin-left: 2px; padding: 2px 5px; border-radius: 2px; border: 1px solid rgba(196, 154, 82, .3); font: 400 10px 'Oswald', sans-serif; letter-spacing: .08em;
  text-transform: none; color: var(--m-ink-dim); background: rgba(0, 0, 0, .3); }
.nav-btn:hover, .nav-btn.force-hover { border-color: var(--nb-edge-hi); color: var(--m-ink); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 225, 170, .1), inset 0 0 0 2px rgba(0, 0, 0, .35), 0 3px 0 #0b0503, 0 9px 16px rgba(0, 0, 0, .42); }
.nav-btn:hover::before, .nav-btn.force-hover::before, .nav-btn:focus-visible::before { opacity: 1; }
.nav-back:hover .ic, .nav-back.force-hover .ic { transform: translateX(-3px); }
.nav-exit:hover .ic, .nav-exit.force-hover .ic { transform: translateX(3px); }
.nav-btn:focus-visible { outline: 1px solid var(--nb-edge-hi); outline-offset: 3px; color: var(--m-ink); }
.nav-btn:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(0, 0, 0, .35), 0 1px 0 #0b0503; }
/* sair: cobre/vinho escuro na borda e no ícone — diferente, sem virar alerta */
.nav-exit { --nb-edge: rgba(172, 84, 58, .55); --nb-edge-hi: #c9714f; --nb-icon: #c9714f; --nb-tint: rgba(170, 70, 45, .16); color: rgba(236, 205, 188, .9); }

/* ações principais continuam no topo da hierarquia: largura cheia e mais espaço */
#on-home .on-choices { gap: 10px; margin-top: 16px; }
#on-home .on-choices .btn.big, #btn-create-go, #btn-join, #btn-ready, #btn-room-start { width: 100%; }
#btn-join { margin-top: 18px; }
#on-lobby #btn-ready, #on-lobby #btn-room-start { margin: 6px 0 2px; }

@media (max-height: 720px) {
  .online-panel { padding-top: 16px; padding-bottom: 14px; }
  .online-panel .btn.big { font-size: 21px; padding: 9px 24px; margin-top: 10px; margin-bottom: 8px; }
  #room-players { gap: 4px; }
  #room-players li { padding: 6px 12px; }
  .on-foot { margin-top: 12px; padding-top: 12px; }
  .nav-btn { height: 38px; }
}

/* telas baixas (janela de PC até 960×540): a sala inteira cabe sem cortar nada; se ainda faltar altura, o painel rola */
.online-panel { max-height: calc(100vh - 24px); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(196, 154, 82, .35) transparent; }
@media (max-height: 640px) {
  #online.screen { padding: 10px; }
  .online-panel { padding: 12px 22px; }
  .online-panel h2 { font-size: 24px; margin-bottom: 8px; }
  .room-label { font-size: 11px; }
  .room-code-row { margin: 0 0 6px; gap: 10px; }
  #room-code { font-size: 30px; }
  .lobby-tags { margin-bottom: 6px; }
  .lobby-tags span { padding: 2px 8px; font-size: 11px; }
  #room-players { gap: 3px; margin-bottom: 6px; }
  #room-players li { padding: 3px 10px; font-size: 15px; }
  #lobby-host-opts { gap: 14px; margin: 2px 0; }
  #lobby-host-opts .seg button { padding-top: 4px; padding-bottom: 4px; }
  .online-panel .net-status { margin-top: 4px; min-height: 1.2em; font-size: 14px; }
  .online-panel .btn.big, #on-lobby .btn.big { font-size: 19px; padding: 7px 20px; margin: 6px 0 2px; }
  .on-rows { gap: 5px; margin-bottom: 8px; }
  .on-row { padding: 6px 12px; }
  .on-foot { margin-top: 8px; padding-top: 10px; }
  .nav-btn { height: 34px; min-width: 150px; font-size: 13px; }
}

/* =====================================================================
   Fim de partida (#end): o mesmo painel das telas online — rótulo pequeno, título, ação principal larga
   e o rodapé com .nav-btn (Voltar ao menu / Sair da sala). Vitória em latão; derrota em cobre apagado.
   ===================================================================== */
#end .end-panel { width: min(460px, 100%); text-align: center; padding: 22px 28px 18px; }
#end-kicker { margin: 0 0 6px; font: 400 13px 'Oswald', sans-serif; letter-spacing: .32em; color: var(--m-brass); }
#end h1 { margin: 0 0 6px; font-size: clamp(34px, 5vw, 50px); line-height: 1.05; }
#end-sub { margin: 0; font: 400 18px/1.35 'Oswald', sans-serif; letter-spacing: .04em; color: var(--m-ink); }
#end-detail { margin: 10px 0 0; font: 400 12px/1.6 'Oswald', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--m-ink-dim); }
#end-wait { margin: 14px 0 0; }
#end #btn-again { width: 100%; margin: 18px 0 2px; }
#end .nav-btn kbd.hidden { display: none; }
.end-panel[data-result="lost"] #end-kicker { color: #c9714f; }
.end-panel[data-result="lost"] h1 { color: #d6b98c; text-shadow: 0 3px 0 #2a1408; }
@media (max-height: 620px) {
  #end .end-panel { padding: 14px 22px 12px; }
  #end #btn-again { font-size: 21px; padding: 9px 24px; margin-top: 12px; }
}

/* ---------- entrar só para assistir (fantasma) ---------- */
#btn-watch { width: 100%; margin-top: 8px; }
#on-join .on-hint { margin: 10px 0 0; font: 400 13px/1.45 'Oswald', sans-serif; letter-spacing: .04em; color: var(--m-ink-dim); }
#lobby-watchers { margin: 8px 0 0; font: 400 13px 'Oswald', sans-serif; letter-spacing: .1em; color: var(--m-ink-dim); text-align: left; }
#lobby-watchers b { color: var(--m-ink); font-weight: 500; }
#lobby-watchers .ic { width: 15px; height: 15px; vertical-align: -3px; margin-right: 6px; color: var(--m-brass); }
#on-lobby .lobby-role-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 12px 0 2px; }
#on-lobby .lobby-role-row > span { font: 400 12px 'Oswald', sans-serif; letter-spacing: .22em; text-transform: uppercase; color: var(--m-ink-dim); }
#lobby-role button[disabled] { opacity: .4; cursor: default; }

/* configurações: observação curta abaixo de uma opção */
.set-note { margin: 4px 0 8px; font: 400 13px/1.45 'Oswald', sans-serif; letter-spacing: .03em; color: var(--ink-dim); }

/* janela mais baixa (ex.: 1600 × 900): a biblioteca tem 4 jogos e, no Bluff de Cores, as regras da mesa — a coluna
   aperta um pouco para Jogar, Jogar online e o rodapé caberem sem rolar */
@media (max-height: 960px) {
  .lib { padding-top: 3vh; padding-bottom: 2.4vh; }
  .lib-head { margin-bottom: 1.6vh; }
  .lib-game { padding-top: 8px; padding-bottom: 8px; }
  .lib-detail { margin-top: 2vh; }
  .lib-label { margin: 1.5vh 0 .9vh; }
  #lib-name { font-size: clamp(32px, 3.2vw, 46px); }
  .lib-mode { padding-top: 10px; padding-bottom: 9px; }
  .lib-play { margin-top: 1.8vh; }
  .lib-opts .lib-label { margin: 1.2vh 0 .6vh; }
  .lib-game { padding-top: 6px; padding-bottom: 6px; }
}
