* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #6b5a48;
  font-family: "Patrick Hand", "Comic Sans MS", cursive;
  color: #2b2b33;
  user-select: none;
}

#game { display: block; }
#game.playing { cursor: none; }

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(40, 30, 20, 0.35);
  z-index: 10;
}
.hidden { display: none !important; }

.paper {
  background-color: #fffdf4;
  background-image:
    linear-gradient(90deg, transparent 52px, rgba(220, 70, 70, 0.55) 52px, rgba(220, 70, 70, 0.55) 54px, transparent 54px),
    repeating-linear-gradient(180deg, transparent 0, transparent 29px, rgba(90, 150, 210, 0.38) 29px, rgba(90, 150, 210, 0.38) 30px);
  box-shadow: 6px 9px 0 rgba(0, 0, 0, 0.25), 0 0 40px rgba(0, 0, 0, 0.25);
}

.card {
  width: min(600px, 94vw);
  max-height: 95vh;
  overflow-y: auto;
  padding: 18px 28px 18px 72px;
  transform: rotate(-0.6deg);
  position: relative;
}
.card.narrow { width: min(380px, 94vw); text-align: center; }
.card::before {
  /* trocito de cinta adhesiva */
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 120px;
  height: 26px;
  transform: translateX(-50%) rotate(2deg);
  background: rgba(255, 240, 170, 0.75);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.title {
  font-family: "Permanent Marker", "Patrick Hand", cursive;
  font-size: 46px;
  margin: 6px 0 0;
  color: #2456c9;
  text-shadow: 2px 2px 0 rgba(211, 58, 44, 0.35);
  letter-spacing: 1px;
}
.subtitle { margin: 0 0 10px; font-size: 21px; color: #555; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 9px 0;
  flex-wrap: wrap;
}
.row > label { width: 120px; font-size: 21px; }

input#nameInput {
  font: inherit;
  font-size: 21px;
  border: none;
  border-bottom: 2px dashed #2b2b33;
  background: transparent;
  outline: none;
  padding: 2px 6px;
  width: 200px;
  color: #2456c9;
}

input[type="range"] { flex: 1; min-width: 160px; accent-color: #2456c9; }

.choices { display: flex; gap: 8px; flex-wrap: wrap; }

button {
  font: inherit;
  font-size: 19px;
  cursor: pointer;
  background: #fffdf4;
  color: #2b2b33;
  border: 2px solid #2b2b33;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  padding: 4px 14px;
  transition: transform 0.08s, background 0.15s;
}
button:hover { transform: rotate(-1.5deg) scale(1.04); background: #fff7c2; }
button.sel {
  background: #fff176;
  border-color: #d33a2c;
  box-shadow: 2px 3px 0 rgba(211, 58, 44, 0.35);
}

button.big {
  display: block;
  margin: 14px auto 8px;
  font-size: 28px;
  padding: 6px 34px;
  background: #c5ecbe;
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.25);
}
button.big:hover { background: #aee3a5; }
button.big.alt { background: #ffd1dc; }
button.big.alt:hover { background: #ffbccc; }
.btnrow { display: flex; gap: 16px; justify-content: center; }
.btnrow button.big { margin: 14px 0 6px; }

.hint { font-size: 18px; color: #2456c9; margin: 6px 0; }
.hint.small { font-size: 16px; color: #666; }

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 18px;
  font-size: 17px;
  margin-top: 8px;
}
kbd {
  display: inline-block;
  font-family: inherit;
  font-size: 15px;
  border: 1.5px solid #2b2b33;
  border-radius: 6px 3px 7px 3px;
  padding: 0 6px;
  margin: 0 2px;
  background: #fff;
  box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.2);
}

table.results {
  width: 100%;
  border-collapse: collapse;
  font-size: 20px;
  margin: 8px 0;
}
table.results th { text-align: left; color: #666; font-weight: normal; font-size: 17px; }
table.results th:nth-child(n+3), table.results td:nth-child(n+3) { text-align: center; }
table.results td { padding: 1px 4px; height: 30px; }
table.results td:nth-child(2) { font-weight: bold; }
table.results tr.me { background: rgba(255, 241, 118, 0.7); }
