:root {
  --rojo: #7b1e1e;
  --crema: #f6ecd8;
  --tinta: #2b2320;
  --oro: #d9a441;
  --verde: #2e5d4b;
  --marca: #c1440e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--crema);
  color: var(--tinta);
  min-height: 100vh;
}

#app { max-width: 34rem; margin: 0 auto; padding: 1rem; }

header h1 {
  margin: 0;
  color: var(--rojo);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}

header .beta {
  font-size: 0.65em;
  vertical-align: super;
  color: var(--oro);
}

header .relays { margin: 0.25rem 0 0; font-size: 0.85rem; font-style: italic; opacity: 0.75; }

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.bar label { font-size: 0.9rem; }

.bar input {
  font: inherit;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--tinta);
  border-radius: 4px;
  background: #fff;
}

.bar button, .cell {
  font: inherit;
  cursor: pointer;
}

.bar button {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  background: var(--verde);
  color: var(--crema);
}

.bar button:hover { filter: brightness(1.1); }

#status { margin: 0 0 0 auto; font-size: 0.9rem; }
#status.win { color: var(--marca); font-weight: bold; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.cell {
  aspect-ratio: 1;
  border: 2px solid var(--tinta);
  border-radius: 6px;
  background: #fffdf5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.25rem;
}

.cell .num { font-size: 0.7rem; opacity: 0.55; }
.cell .es { font-size: 0.95rem; font-weight: bold; }
.cell .en { font-size: 0.7rem; font-style: italic; opacity: 0.65; }

.cell.marked {
  background: var(--marca);
  color: var(--crema);
  border-color: var(--rojo);
}

.cell.marked .num, .cell.marked .en { opacity: 0.85; }

footer {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.7;
}
