* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #17110a;
  color: #f3e6cc;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 540px;
  height: 960px;
  background:
    radial-gradient(ellipse at 50% 8%, rgba(214, 168, 96, 0.28), transparent 55%),
    linear-gradient(180deg, #3a2a17 0%, #221709 100%);
  border: 1px solid #4a3620;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 0 70px rgba(0,0,0,0.55);
  overflow: hidden;
}

#scoreboard {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: linear-gradient(180deg, rgba(20,12,4,0.7), rgba(20,12,4,0));
  z-index: 10;
  pointer-events: none;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
}

.team .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  opacity: 0.9;
  font-variant: small-caps;
}

.team .score {
  font-family: "Courier New", "Courier", monospace;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
  transition: transform 0.15s ease;
}

/* "Recto" (right-hand page) team — warm oxblood ink */
.team.red .label, .team.red .score {
  color: #c65a3e;
  text-shadow: 0 0 14px rgba(214, 168, 96, 0.55), 0 0 3px rgba(198, 90, 62, 0.9);
}

/* "Verso" (left-hand page) team — muted teal-ink */
.team.blue .label, .team.blue .score {
  color: #4f96a0;
  text-shadow: 0 0 14px rgba(214, 168, 96, 0.55), 0 0 3px rgba(79, 150, 160, 0.9);
}

.score.bump { transform: scale(1.35); }

.meta { text-align: center; }

.meta .title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 6px;
  opacity: 0.9;
  font-variant: small-caps;
  color: #e8d3a2;
}

.meta .subtitle {
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.55;
  margin-top: 4px;
  font-family: "Courier New", monospace;
  color: #d6a460;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
}

.ticker {
  position: absolute;
  left: 0; right: 0;
  bottom: 6px;
  text-align: center;
  font-family: "Courier New", "Courier", monospace;
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.5;
  color: #d6a460;
  pointer-events: none;
}

/* A "shelf tremor" — books rattle in their stacks */
@keyframes quake {
  0%   { transform: translate(0, 0) rotate(0); }
  10%  { transform: translate(-3px, 2px) rotate(0.25deg); }
  20%  { transform: translate(4px, -3px) rotate(-0.3deg); }
  30%  { transform: translate(-4px, 1px) rotate(0.2deg); }
  40%  { transform: translate(3px, -2px) rotate(-0.25deg); }
  50%  { transform: translate(-2px, 3px) rotate(0.3deg); }
  60%  { transform: translate(3px, -1px) rotate(-0.2deg); }
  70%  { transform: translate(-3px, -2px) rotate(0.15deg); }
  80%  { transform: translate(4px, 2px) rotate(-0.15deg); }
  90%  { transform: translate(-2px, -1px) rotate(0.2deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

#stage.shaking {
  animation: quake 0.32s linear infinite;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7),
              inset 0 0 70px rgba(0,0,0,0.55),
              0 0 40px rgba(180, 70, 40, 0.55);
}
