/* Lotería ALL TV — estilos comunes de la TV y del celular */
:root {
  --naranja: #FF9800;
  --naranja-osc: #E65100;
  --fondo: #14100c;
  --fondo2: #221a12;
  --texto: #fff8ee;
  --tenue: #c9b8a0;
  --papel: #fff3d6;
  --tinta: #2b1a0c;
  --verde: #2e9d4f;
  --rojo: #d23c2f;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--fondo);
  background-image: radial-gradient(ellipse at top, #3a2410 0%, var(--fondo) 60%);
  color: var(--texto);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.oculto { display: none !important; }
.marca { color: var(--naranja); font-weight: 800; letter-spacing: .02em; }

/* Carta de lotería: papel, número arriba, dibujo y nombre abajo.
   Sin border-radius junto con border (en las teles gasta memoria gráfica). */
.carta {
  position: relative;
  background: var(--papel);
  color: var(--tinta);
  border: .18em solid var(--tinta);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  aspect-ratio: 3 / 4.2;
  padding: .3em .2em .25em;
  overflow: hidden;
  user-select: none; -webkit-user-select: none;
}
.carta .num { align-self: flex-start; font-weight: 800; font-size: .9em; line-height: 1; padding-left: .15em; }
.carta img { width: 72%; flex: 1 1 auto; min-height: 0; object-fit: contain; pointer-events: none; }
.carta .nom {
  font-weight: 800; font-size: .78em; line-height: 1.05; text-align: center; text-transform: uppercase;
  width: 100%; border-top: .1em solid var(--tinta); padding-top: .15em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* El frijolito encima de la carta marcada */
.carta .frijol {
  position: absolute; left: 50%; top: 46%; width: 46%; aspect-ratio: 1.25 / 1;
  transform: translate(-50%, -50%) rotate(-18deg);
  border-radius: 50%;
  background: radial-gradient(ellipse at 35% 30%, #a86a3d 0%, #6b3b1b 45%, #3e1f0b 100%);
  box-shadow: 0 .15em .3em rgba(0,0,0,.45);
}
.carta.figura { outline: .25em solid var(--verde); outline-offset: -.25em; }

.boton {
  font: inherit; font-weight: 700;
  background: var(--fondo2); color: var(--texto);
  border: .12em solid #5a4630;
  padding: .55em 1.1em; cursor: pointer;
}
.boton.principal { background: var(--naranja); color: #1a0f00; border-color: var(--naranja); }
.boton.elegido { background: #4a3218; border-color: var(--naranja); color: var(--naranja); }

.aviso {
  position: fixed; left: 50%; top: 4%; transform: translateX(-50%);
  background: rgba(0,0,0,.85); color: #fff; padding: .6em 1.2em; font-weight: 700;
  border-left: .3em solid var(--naranja);
  transition: opacity .3s; opacity: 0; pointer-events: none; z-index: 50; max-width: 90vw; text-align: center;
}
.aviso.ver { opacity: 1; }

.creditos { color: #7d6c58; font-size: .7em; }
.carta .nom.largo { font-size: .6em; padding-top: .3em; }
