/* Roleta: roda de madeira com casas, bola, pano de apostas vertical sobre veludo verde, fichas */
.rl-mesa { display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center; align-items: flex-start; padding: 1.2rem; }
.rl-lado-roda { position: relative; display: flex; flex-direction: column; align-items: center; gap: .7rem; width: min(330px, 100%); }
.rl-roda { width: 100%; height: auto; filter: drop-shadow(0 10px 14px rgba(0,0,0,.45)); }
.rl-giro, .rl-bola-giro, .rl-bola-raio { transform-origin: 0 0; }
.rl-num-roda { fill: #fff; font: 700 8.5px var(--sans, sans-serif); text-anchor: middle; dominant-baseline: central; }
.rl-resultado { position: absolute; top: calc(50% - 2.6rem); left: 50%; transform: translate(-50%, -50%); width: 3.6rem; height: 3.6rem; border-radius: 50%; display: grid; place-items: center;
  font: 700 1.6rem var(--sans); color: #fff; border: 3px solid #f3d27a; box-shadow: 0 6px 16px rgba(0,0,0,.5); animation: rl-surge .4s ease-out; pointer-events: none; }
.rl-resultado[hidden] { display: none; }
.rl-resultado.vermelho { background: #c0262d; } .rl-resultado.preto { background: #1b1b1f; } .rl-resultado.verde { background: #178a4c; }
@keyframes rl-surge { from { transform: translate(-50%, -50%) scale(.3); opacity: 0; } }
.rl-ultimos { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: center; min-height: 1.7rem; }
.rl-bolinha { display: inline-grid; place-items: center; min-width: 1.55rem; height: 1.55rem; padding: 0 .15rem; box-sizing: border-box; border-radius: 999px; font: 700 .75rem var(--sans); color: #fff; }
.rl-bolinha.vermelho { background: #c0262d; } .rl-bolinha.preto { background: #1b1b1f; border: 1px solid #555; } .rl-bolinha.verde { background: #178a4c; }
.rl-vazio { font: .8rem var(--sans); color: rgba(255,255,255,.7); }

.rl-pano { display: grid; grid-template-columns: 3.1rem 2.5rem repeat(3, minmax(2.6rem, 3.3rem)); grid-template-rows: repeat(14, minmax(1.85rem, 2.1rem)); gap: 0;
  border: 2px solid rgba(255,255,255,.75); border-radius: 6px; overflow: hidden; }
.rl-casa { position: relative; border: 1px solid rgba(255,255,255,.55); background: transparent; color: #fff; font: 700 .95rem var(--sans); cursor: pointer; padding: 0; display: grid; place-items: center; line-height: 1.05; }
.rl-casa.vermelho { background: rgba(192,38,45,.92); } .rl-casa.preto { background: rgba(20,20,24,.9); } .rl-casa.verde { background: rgba(23,138,76,.95); font-size: 1.1rem; }
.rl-casa.fora { font-size: .74rem; background: rgba(0,0,0,.08); }
.rl-casa.duzia { font-size: .78rem; }
.rl-casa:hover:not(:disabled) { box-shadow: inset 0 0 0 3px #ffe08a; }
.rl-casa:disabled { cursor: default; }
.rl-casa.ganhou { box-shadow: inset 0 0 0 3px #ffe08a, 0 0 14px #ffe08a; z-index: 1; animation: rl-pisca .6s ease-in-out 4 alternate; }
.rl-casa.dica { box-shadow: inset 0 0 0 3px #ffe08a; background-image: repeating-linear-gradient(45deg, rgba(255,224,138,.25) 0 6px, transparent 6px 12px); }
@keyframes rl-pisca { to { filter: brightness(1.45); } }
.losango { display: block; width: 1.05rem; height: 1.05rem; transform: rotate(45deg); border: 1.5px solid #fff; }
.losango.v { background: #c0262d; } .losango.p { background: #1b1b1f; }
.rl-pilha:empty { display: none; }
.rl-pilha { --f: #e8e2d4; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); min-width: 1.45rem; height: 1.45rem; padding: 0 .15rem; box-sizing: border-box; border-radius: 999px;
  display: grid; place-items: center; font: 700 .62rem var(--sans); color: #2b2620; background: var(--f); border: 2px dashed rgba(255,255,255,.85); box-shadow: 0 2px 0 rgba(0,0,0,.45); z-index: 2; }
.rl-pilha[data-v="5"] { --f: #e05252; color: #fff; } .rl-pilha[data-v="25"] { --f: #2f8f5b; color: #fff; } .rl-pilha[data-v="100"] { --f: #2b2620; color: #fff; }

.rl-controles { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; align-items: center; }
.rl-fichas { display: flex; gap: .45rem; }
.rl-ficha { --f: #e8e2d4; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; font: 700 .85rem var(--sans); color: #fff; position: relative;
  background: radial-gradient(circle, var(--f) 0 52%, #fff 52% 57%, var(--f) 57%); box-shadow: 0 3px 0 rgba(0,0,0,.35); transition: transform .12s; }
.rl-ficha::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.7); }
.rl-ficha[data-v="1"] { --f: #9a948a; } .rl-ficha[data-v="5"] { --f: #c8343a; } .rl-ficha[data-v="25"] { --f: #2f8f5b; } .rl-ficha[data-v="100"] { --f: #2b2620; }
.rl-ficha.sel { transform: translateY(-5px); box-shadow: 0 0 0 3px var(--realce), 0 6px 0 rgba(0,0,0,.3); }
.rl-ficha:disabled { opacity: .35; cursor: default; }
.rl-acoes { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.rl-acoes [hidden] { display: none; }
.rl-banco { font: .95rem var(--sans); white-space: nowrap; }
.rl-placar { grid-template-columns: repeat(2, 1fr); }
.rl-lista { list-style: none; margin: .3rem 0 0; padding: 0; max-height: 240px; overflow-y: auto; font: .82rem var(--sans); }
.rl-lista li { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; padding: .25rem 0; border-bottom: 1px solid var(--fio); }
.rl-lista b.mais { color: #2f9e57; } .rl-lista b.menos { color: #c0392b; }
.rl-lista i { font-size: .76rem; opacity: .85; }
.rl-lista li.vazia { opacity: .7; }
.rl-legenda { font: .74rem var(--sans); opacity: .8; margin: .3rem 0 0; }
@media (max-width: 420px) { .rl-pano { grid-template-columns: 2.7rem 2.2rem repeat(3, minmax(2.3rem, 1fr)); } .rl-mesa { padding: .7rem; } }

/* mini do tutorial */
.xz-mini.rl-mini { width: 220px; height: 220px; aspect-ratio: auto; display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr; place-items: center; padding: 10px; box-sizing: border-box; border: 0; border-radius: 12px;
  background: radial-gradient(ellipse at center, #2a7346 0%, #1d5634 60%, #123d24 100%); }
.xz-mini.rl-mini div { background: transparent; }
.rl-mini .rl-pano { grid-template-rows: repeat(14, 12px); grid-template-columns: 26px 20px repeat(3, 24px); }
.rl-mini .rl-casa { font-size: 7px; }
.rl-mini .rl-casa.fora { font-size: 6px; }
.rl-mini .losango { width: 6px; height: 6px; }
.rl-mini .rl-roda { width: 180px; }
.xz-mini.rl-mini .rl-pano { place-items: stretch; background: transparent; }

/* tela cheia no celular: roda pequena ao lado do pano (cabe tudo sem rolar);
   enquanto a bola gira, a roda cresce por cima da mesa e volta ao canto depois de mostrar o número */
@media (max-width: 600px) {
  body.tc .rl-mesa { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: start; padding: .6rem; }
  body.tc .rl-lado-roda { width: 100%; gap: .4rem; grid-column: 1; grid-row: 1; }
  body.tc .rl-mesa > #panoLugar { grid-column: 2; grid-row: 1; }
  body.tc .rl-ultimos .rl-bolinha { min-width: 1.35rem; height: 1.35rem; font-size: .68rem; }
  body.tc .rl-resultado { width: 2.4rem; height: 2.4rem; font-size: 1.1rem; top: 50%; }
  body.tc .rl-pano { grid-template-columns: 2.5rem 2.1rem repeat(3, 2.35rem); grid-template-rows: repeat(14, clamp(1.6rem, calc((var(--tc-alto, 700px) - 270px) / 14), 2.2rem)); }
  body.tc .rl-casa { font-size: .85rem; }
  body.tc .rl-ficha { width: 42px; height: 42px; }
  body.tc .rl-mesa.girando .rl-lado-roda { position: absolute; z-index: 5; left: 50%; top: 1rem; transform: translateX(-50%); width: min(300px, 86%);
    padding: .8rem; box-sizing: border-box; border-radius: 50%; background: radial-gradient(circle, rgba(18,61,36,.92) 60%, rgba(18,61,36,0) 72%); animation: rl-cresce .35s ease-out; }
  body.tc .rl-mesa.girando .rl-ultimos { display: none; }
  body.tc .rl-mesa.girando .rl-resultado { width: 3.6rem; height: 3.6rem; font-size: 1.6rem; }
}
@keyframes rl-cresce { from { transform: translateX(-50%) scale(.4); opacity: .3; } }
@media (prefers-reduced-motion: reduce) { body.tc .rl-mesa.girando .rl-lado-roda { animation: none; } }
