:root {
  --papel: #f9f6ed;
  --caneta: #1f3a99;
  --vermelho: #cf3a3a;
  --postit: #fff3a6;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; background: var(--papel); color: var(--caneta); font-family: 'Kalam', cursive; user-select: none; }
#tela, #efeitos { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#efeitos { pointer-events: none; }

/* placar: anotação à mão nas margens da folha (a margem vermelha fica em 72px) */
.hud { position: fixed; inset: 0; pointer-events: none; font-family: 'Kalam', cursive; font-weight: 700; line-height: 1; }
.hud svg path { fill: none; stroke: var(--caneta); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pl-pagina { position: absolute; left: 88px; top: 18px; display: flex; align-items: baseline; gap: 14px; }
.pl-pagina b { font-size: 40px; }
.pl-pagina span { font-size: 22px; font-weight: 400; }
.pl-pagina svg { position: absolute; left: -4px; right: -10px; bottom: -10px; width: calc(100% + 14px); height: 10px; }
.pl-nota { position: absolute; right: 30px; top: 12px; text-align: center; color: var(--vermelho); }
.pl-nota > span { display: block; font-size: 18px; font-weight: 400; margin-bottom: 2px; }
.pl-nota__num { position: relative; padding: 10px 22px 6px; min-width: 90px; }
.pl-nota__num b { position: relative; font-size: 42px; }
.pl-nota__num svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pl-nota__num svg path { stroke: var(--vermelho); stroke-width: 2.6; }
.pl-ganho { position: absolute; right: 100%; top: 38px; font-style: normal; font-size: 26px; white-space: nowrap; animation: ganho .9s ease-out forwards; }
@keyframes ganho { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-34px); } }
.pl-vida { position: absolute; left: 88px; bottom: 74px; display: flex; align-items: center; gap: 10px; }
.pl-coracao { width: 34px; height: 31px; }
.pl-barra { width: 220px; height: 26px; }
.pl-barra .pl-barra__rabisco { stroke-width: 2; }
.pl-barra #plVidaRect { transition: width .25s; }
.pl-vida b { font-size: 34px; min-width: 60px; }
.pl-vida.baixa, .pl-vida.baixa svg path { color: var(--vermelho); stroke: var(--vermelho); }
.pl-vida.doeu { animation: doeu .3s; }
@keyframes doeu { 25% { transform: translateX(-4px) rotate(-1deg); } 75% { transform: translateX(3px) rotate(1deg); } }
.pl-folego { position: absolute; left: 132px; bottom: 112px; display: flex; align-items: center; gap: 8px; transition: opacity .5s; }
.pl-folego span { font-size: 16px; font-weight: 400; }
.pl-folego svg { width: 160px; height: 12px; }
.pl-folego svg path { stroke-width: 1.6; }
.pl-folego.cheio { opacity: 0; }
.pl-folego.cansado, .pl-folego.cansado svg path { color: var(--vermelho); stroke: var(--vermelho); }
.pl-municao { position: absolute; left: 88px; bottom: 18px; display: flex; align-items: flex-end; gap: 8px; }
.pl-municao b { font-size: 46px; }
.pl-municao > span { font-size: 22px; font-weight: 400; margin: 0 10px 6px 0; }
.pl-municao svg { margin-bottom: 6px; overflow: visible; }
.pl-municao svg path { stroke-width: 1.3; }
.pl-bala .pl-bala__risco { display: none; stroke-width: 1.6; }
.pl-bala.gasta .pl-bala__cheia { display: none; }
.pl-bala.gasta .pl-bala__risco { display: inline; }
.pl-bala.gasta .pl-bala__corpo { opacity: .45; }
.pl-municao.pouca b { color: var(--vermelho); }
.pl-armas { position: absolute; right: 30px; bottom: 186px; list-style: none; text-align: right; }
.pl-armas li { position: relative; font-size: 26px; padding: 6px 16px; opacity: .45; }
.pl-armas li.atual { opacity: 1; font-size: 32px; }
.pl-armas li i { font-style: normal; font-weight: 400; }
.pl-armas li small { font-size: 18px; font-weight: 400; margin-left: 6px; }
.pl-armas li svg { position: absolute; inset: -2px -6px; width: calc(100% + 12px); height: calc(100% + 4px); }
.pl-granadas { position: absolute; right: 44px; bottom: 150px; display: flex; align-items: center; gap: 4px; }
.pl-granadas span { font-size: 18px; font-weight: 400; margin-right: 6px; }
.pl-granadas svg { width: 24px; height: 24px; opacity: .35; }
.pl-granadas svg.cheia { opacity: 1; }
.pl-granadas svg.mao { transform: scale(1.25); }
.pl-granadas svg path { stroke-width: 1.8; }
.pl-granadas em { font-style: normal; font-size: 18px; margin-left: 8px; color: var(--vermelho); }
.pl-mapa { position: absolute; right: 26px; top: 112px; width: 150px; height: 150px; }
.pl-combo { position: absolute; right: 205px; top: 30px; text-align: center; color: var(--vermelho); opacity: 0; transition: opacity .3s; }
.pl-combo.ligado { opacity: 1; }
.pl-combo b { display: block; font-family: 'Caveat', cursive; font-size: 46px; line-height: .9; transform: rotate(-8deg); }
.pl-combo.subiu b { animation: combo .35s ease-out; }
@keyframes combo { from { transform: rotate(-8deg) scale(1.6); } to { transform: rotate(-8deg) scale(1); } }
.pl-combo svg { width: 60px; height: 8px; }
.pl-combo svg path { stroke: var(--vermelho); stroke-width: 3; }
.pl-chefe { position: absolute; left: 50%; top: 18px; width: min(420px, 60vw); transform: translateX(-50%); text-align: center; color: var(--vermelho); }
.pl-chefe b { display: block; font-family: 'Caveat', cursive; font-size: 34px; line-height: 1; margin-bottom: 2px; }
.pl-chefe svg { width: 100%; height: 22px; }
.pl-chefe svg path { stroke: var(--vermelho); }
.pl-pagina em { position: absolute; left: 0; top: 100%; margin-top: 12px; white-space: nowrap; font-style: normal; font-size: 18px; color: var(--vermelho); }
.pl-armaDesc { position: absolute; right: 30px; bottom: 122px; font-size: 16px; font-weight: 400; text-shadow: 0 0 3px #f9f6ed, 0 0 4px #f9f6ed; }
.pl-feed { position: absolute; right: 30px; top: 272px; list-style: none; text-align: right; font-size: 20px; font-weight: 700; line-height: 1.25;
  text-shadow: 0 0 3px #f9f6ed, 0 0 3px #f9f6ed, 0 0 5px #f9f6ed, 0 0 5px #f9f6ed; } /* borda de papel: lê em cima do desenho */
.pl-feed li { transition: opacity .5s; animation: entra .25s ease-out; }
.pl-feed li.vermelho { color: var(--vermelho); }
.pl-feed li.some { opacity: 0; }
@keyframes entra { from { transform: translateX(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.pl-dica { position: absolute; left: 0; right: 0; bottom: 30px; text-align: center; font-size: 22px; font-weight: 400; opacity: 0; transition: opacity .4s; }
.pl-dica.ligada { opacity: .8; }

.aviso { position: absolute; left: 0; right: 0; top: 22%; text-align: center; opacity: 0; transition: opacity .35s; }
.aviso.ligado { opacity: 1; }
.aviso b { display: inline-block; font-family: 'Caveat', cursive; font-size: 84px; padding: 0 18px 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M4 12 C60 6 120 16 180 9 S270 12 296 7' fill='none' stroke='%23cf3a3a' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") bottom / 100% 16px no-repeat; }
.aviso span { display: block; font-size: 26px; font-weight: 400; margin-top: 8px; }

/* menus num post-it colado na folha */
.tela { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; }
.postit { width: min(460px, 100%); background: var(--postit); padding: 30px 34px 24px; transform: rotate(-1.4deg);
  box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 14px 26px -12px rgba(0,0,0,.35); text-align: center; }
.postit--curto { width: min(360px, 100%); }
.titulo { position: relative; display: inline-block; font-family: 'Caveat', cursive; font-size: 104px; line-height: .9; letter-spacing: 1px; }
.titulo::after { content: ''; position: absolute; left: -6%; right: -6%; top: 46%; height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 26' preserveAspectRatio='none'%3E%3Cpath d='M3 15 L40 9 L22 18 L78 8 L60 19 L130 7 L110 18 L190 8 L170 19 L250 9 L232 17 L297 10' fill='none' stroke='%23cf3a3a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.sub { font-size: 21px; margin: 4px 0 18px; }
.postit h2 { font-family: 'Caveat', cursive; font-size: 64px; line-height: 1; margin-bottom: 14px; }
.botao { display: block; width: 100%; margin: 0 auto 10px; padding: 8px 0 10px; font: 700 34px 'Kalam', cursive; color: var(--caneta);
  background: transparent; border: 3px solid currentColor; border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; cursor: pointer; }
.botao:hover { background: rgba(31, 58, 153, .08); }
.botao:focus-visible { outline: 3px dashed var(--vermelho); outline-offset: 4px; }
.botao--leve { font-size: 24px; border-width: 2px; padding: 4px 0 6px; }
.botao:disabled { opacity: .4; cursor: default; }
.aviso-toque { font-size: 19px; color: var(--vermelho); margin-bottom: 8px; }
.recorde { font-size: 19px; min-height: 26px; }
.postit--config { width: min(440px, 100%); }
.cfg { text-align: left; margin-bottom: 14px; }
.cfg p { font-family: 'Caveat', cursive; font-size: 26px; font-weight: 700; margin: 8px 0 0; border-bottom: 2px solid currentColor; }
.cfg label { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 6px 0; }
.cfg input[type=range] { flex: 1; accent-color: var(--caneta); }
.cfg__linha { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 8px 0; }
.cfg__opcoes { flex: 1; display: flex; gap: 6px; }
.cfg__opcoes button { flex: 1; font: 700 17px 'Kalam', cursive; color: var(--caneta); background: transparent; cursor: pointer; padding: 3px 0 1px;
  border: 2px solid currentColor; border-radius: 12px 4px 10px 5px / 5px 10px 4px 12px; }
.cfg__opcoes button:nth-child(2) { border-radius: 5px 11px 4px 12px / 12px 4px 10px 5px; }
.cfg__opcoes button:hover { background: rgba(31, 58, 153, .08); }
.cfg__opcoes button.ativo { background: var(--caneta); color: var(--postit); transform: rotate(-1deg); }
.cfg label b { width: 48px; text-align: right; }
.cfg__marca input { width: 18px; height: 18px; accent-color: var(--caneta); }
.teclas { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; margin: 12px 0 14px; text-align: left; font-size: 17px; }
.teclas b { font-weight: 700; }
.assina { font-size: 16px; opacity: .7; }
.placar { font-size: 24px; margin-bottom: 16px; line-height: 1.15; }

@media (max-width: 560px) {
  .titulo { font-size: 78px; }
  .teclas { grid-template-columns: 1fr; }
}

/* cartas de melhoria: fichas pautadas espalhadas na mesa */
.tela--cartas { background: rgba(249, 246, 237, .55); }
.cartas { text-align: center; }
.cartas h2 { font-family: 'Caveat', cursive; font-size: 58px; line-height: 1; }
.cartas > p { font-size: 22px; margin: 4px 0 18px; }
.cartas__mesa { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.carta { width: 210px; min-height: 250px; padding: 16px 16px 14px; background: #fffdf7; color: var(--caneta); cursor: pointer; font: inherit; text-align: center;
  border: none; box-shadow: 0 1px 1px rgba(0,0,0,.1), 0 14px 26px -12px rgba(0,0,0,.35); position: relative; transition: transform .15s;
  background-image: linear-gradient(transparent 46px, rgba(207,58,58,.6) 46px, rgba(207,58,58,.6) 48px, transparent 48px),
    repeating-linear-gradient(transparent 0 27px, rgba(160,180,225,.7) 27px 28px); }
.carta:nth-child(1) { transform: rotate(-3deg); } .carta:nth-child(3) { transform: rotate(2.5deg); }
.carta:hover, .carta:focus-visible { transform: rotate(0) translateY(-8px) scale(1.04); outline: none; }
.carta i { position: absolute; left: 12px; top: 8px; font-style: normal; font-family: 'Caveat', cursive; font-size: 30px; color: var(--vermelho); }
.carta svg { width: 70px; height: 70px; margin: 52px auto 6px; display: block; }
.carta svg path { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.carta b { display: block; font-family: 'Caveat', cursive; font-size: 30px; line-height: 1; margin-bottom: 6px; }
.carta span { display: block; font-size: 17px; line-height: 1.25; }
.carta small { display: block; margin-top: 8px; font-size: 14px; opacity: .6; }

/* ranking no menu e no fim */
.ranking { list-style: none; margin: 4px auto 10px; max-width: 300px; text-align: left; font-size: 18px; }
.ranking li { display: flex; gap: 8px; border-bottom: 1px dashed rgba(31,58,153,.35); padding: 1px 0; }
.ranking li b { width: 26px; }
.ranking li span { flex: 1; }
.ranking li.eu { color: var(--vermelho); font-weight: 700; }
.ranking__titulo { font-family: 'Caveat', cursive; font-size: 26px; margin-top: 6px; }

/* tela de carregamento: caneta desenhando */
.carregando .postit { text-align: center; }
.carregando h2 { font-family: 'Caveat', cursive; font-size: 72px; line-height: 1; }
.carregando p { font-size: 22px; }
.carregando p::after { content: '...'; display: inline-block; width: 1.2em; text-align: left; animation: pontos 1.2s steps(4) infinite; clip-path: inset(0 100% 0 0); }
@keyframes pontos { to { clip-path: inset(0 -10% 0 0); } }
.carregando svg { width: 220px; height: 40px; }
.carregando svg path { fill: none; stroke: var(--caneta); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 400; animation: risca 1.6s ease-in-out infinite; }
@keyframes risca { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }

/* online: nome + botão lado a lado, recado de erro e a tabela do Tab */
.online { display: flex; gap: 10px; align-items: stretch; margin-bottom: 4px; }
.online__nome { flex: 1; min-width: 0; font: 700 22px 'Kalam', cursive; color: var(--caneta); background: transparent; padding: 2px 6px;
  border: 0; border-bottom: 2px solid currentColor; outline: 0; user-select: text; }
.online__nome::placeholder { color: rgba(31, 58, 153, .45); }
.online__nome:focus { border-bottom-color: var(--vermelho); }
.botao--online { width: auto; flex: 1.2; margin: 0; font-size: 24px; border-width: 2px; padding: 4px 10px 6px; }
.online__msg { min-height: 22px; font-size: 17px; color: var(--vermelho); margin-bottom: 6px; }
.tabela { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-1deg); width: min(420px, calc(100% - 32px));
  background: var(--postit); padding: 18px 26px 16px; box-shadow: 0 14px 26px -12px rgba(0,0,0,.35); pointer-events: none; }
.tabela h3 { font-family: 'Caveat', cursive; font-size: 40px; line-height: 1; margin-bottom: 8px; text-align: center; }
.tabela ol { list-style: none; }
.tabela li { display: grid; grid-template-columns: 28px 1fr 64px 64px; gap: 6px; font-size: 20px; border-bottom: 1px dashed rgba(31, 58, 153, .35); padding: 2px 0; }
.tabela li.eu { color: var(--vermelho); font-weight: 700; }
.tabela li.cab { font-size: 15px; opacity: .7; border-bottom-style: solid; }
.tabela li span:nth-child(n+3) { text-align: right; }
