/* =====================================================================
   TUTTI FRUTTI CHALLENGE · Estilos
   Sistema desarrollado por USLA TECH

   La marca visual nace de la ficha de letra: un cuadrado sólido con la
   letra sorteada. Es el objeto central del juego y el único elemento
   que se permite gritar. Todo lo demás se mantiene callado.
   ===================================================================== */

:root {
  --tinta:    #16203A;   /* índigo profundo: fondo de marca */
  --tinta-2:  #223052;
  --papel:    #EEF1F5;   /* gris azulado frío */
  --blanco:   #FFFFFF;
  --oro:      #E8A317;   /* ocre: la ficha de letra */
  --chicha:   #C6255B;   /* rojo fuerte: STOP, errores */
  --verde:    #1B7A5A;   /* palabra válida */
  --gris:     #6B7686;
  --linea:    #D6DCE5;

  --r: 10px;
  --sombra: 0 1px 2px rgba(22,32,58,.08), 0 8px 24px rgba(22,32,58,.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0 0 .4em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }

a { color: var(--tinta); }

/* --- La ficha de letra: elemento de marca -------------------------- */
.ficha {
  display: inline-grid;
  place-items: center;
  width: 64px; height: 64px;
  background: var(--oro);
  color: var(--tinta);
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 2.4rem;
  border-radius: 14px;
  box-shadow: inset 0 -4px 0 rgba(22,32,58,.18);
  transform: rotate(-4deg);
  user-select: none;
}
.ficha--xl { width: 148px; height: 148px; font-size: 6rem; border-radius: 26px; }
.ficha--sm { width: 38px; height: 38px; font-size: 1.4rem; border-radius: 9px; }

/* --- Estructura ---------------------------------------------------- */
.envoltura { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.estrecho  { max-width: 480px; }
.medio     { max-width: 760px; }

.barra {
  background: var(--tinta);
  color: var(--blanco);
  padding: 14px 0;
}
.barra .envoltura { display: flex; align-items: center; gap: 16px; }
.barra a { color: var(--blanco); text-decoration: none; opacity: .85; }
.barra a:hover { opacity: 1; }
.barra .crece { flex: 1; }
.marca { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.05rem; }

main { padding: 32px 0 64px; }

.tarjeta {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--sombra);
  margin-bottom: 18px;
}

.rejilla { display: grid; gap: 18px; }
.rejilla--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.rejilla--3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* --- Formularios ---------------------------------------------------- */
label { display: block; font-size: .86rem; color: var(--gris); margin-bottom: 5px; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--linea);
  border-radius: 8px;
  background: var(--blanco);
  font: inherit;
  color: var(--tinta);
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(232,163,23,.45);
  outline-offset: 1px;
  border-color: var(--oro);
}
.campo { margin-bottom: 14px; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
legend {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700; font-size: 1.05rem;
  padding: 0; margin-bottom: 12px;
}
.ayuda { font-size: .8rem; color: var(--gris); margin-top: 4px; }

.boton {
  display: inline-block;
  padding: 11px 20px;
  border: 0; border-radius: 8px;
  background: var(--tinta);
  color: var(--blanco);
  font: inherit; font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.boton:hover { background: var(--tinta-2); }
.boton--oro { background: var(--oro); color: var(--tinta); }
.boton--oro:hover { background: #f2b23a; }
.boton--suave { background: transparent; color: var(--tinta); border: 1px solid var(--linea); }
.boton--suave:hover { background: var(--papel); }
.boton--chicha { background: var(--chicha); }

/* --- Avisos --------------------------------------------------------- */
.aviso {
  border-left: 4px solid var(--gris);
  background: var(--blanco);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin-bottom: 18px;
}
.aviso--bien  { border-color: var(--verde); }
.aviso--mal   { border-color: var(--chicha); }
.aviso--ojo   { border-color: var(--oro); }

/* --- Tablas --------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--linea); }
th { font-size: .8rem; color: var(--gris); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }

/* --- Etiquetas de estado -------------------------------------------- */
.marca-estado {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 600;
  background: var(--papel);
  color: var(--gris);
}
.marca-estado--vivo    { background: #E4F3ED; color: var(--verde); }
.marca-estado--espera  { background: #FDF1DA; color: #96690C; }
.marca-estado--cerrado { background: #F0E3E8; color: var(--chicha); }

/* --- Casillas de columnas ------------------------------------------- */
.columnas { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 8px; }
.columnas label {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--linea); border-radius: 8px;
  padding: 9px 11px; margin: 0;
  color: var(--tinta); font-size: .92rem;
  cursor: pointer;
}
.columnas input { width: auto; }
.columnas label:has(input:checked) {
  border-color: var(--oro);
  background: #FEF8EC;
}

/* --- Pie ------------------------------------------------------------ */
.pie {
  padding: 28px 0 40px;
  color: var(--gris);
  font-size: .82rem;
}
.sello { font-weight: 600; color: var(--tinta); }

@media (max-width: 560px) {
  h1 { font-size: 1.6rem; }
  .ficha--xl { width: 110px; height: 110px; font-size: 4.4rem; }
  main { padding: 22px 0 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
