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

html, body {
  height: 100%;
  background: #d8d3c6;
  color: #2a2620;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "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% 0%, rgba(220, 210, 190, 0.55), transparent 65%),
    linear-gradient(180deg, #c9c2b2 0%, #b3aa97 100%);
  border: 1px solid #4a4338;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(40, 30, 20, 0.45),
              inset 0 0 80px rgba(80, 65, 45, 0.18);
  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(245, 235, 215, 0.92), rgba(245, 235, 215, 0));
  z-index: 10;
  pointer-events: none;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
  background: rgba(248, 242, 224, 0.88);
  padding: 6px 14px;
  border: 1px solid rgba(40, 30, 20, 0.5);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset,
              0 2px 8px rgba(60, 50, 30, 0.15);
}

.team .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #4a3a28;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
}

.team .score {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Georgia", serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  margin-top: 4px;
  transition: transform 0.15s ease;
  color: #1a1410;
}

.team.red .label, .team.red .score {
  color: #1a1410;
}

.team.blue .label, .team.blue .score {
  color: #2a2826;
}

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

.meta {
  text-align: center;
  background: rgba(248, 242, 224, 0.88);
  padding: 8px 16px;
  border: 1px solid rgba(40, 30, 20, 0.5);
  border-radius: 2px;
}

.meta .title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 5px;
  color: #2a2218;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
}

.meta .subtitle {
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(60, 50, 35, 0.65);
  margin-top: 4px;
}

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

#rake-status {
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 4px;
  color: #2a2218;
  background: rgba(248, 242, 224, 0.85);
  padding: 4px 14px;
  border: 1px solid rgba(40, 30, 20, 0.4);
  border-radius: 1px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 600;
  z-index: 9;
  pointer-events: none;
}

#rake-status.imminent {
  background: rgba(255, 245, 225, 0.95);
  color: #5a2810;
  box-shadow: 0 0 18px rgba(120, 80, 40, 0.35);
}

#harmony-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

#harmony-overlay.flash {
  opacity: 1;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(255, 250, 230, 0.45), transparent 55%);
  animation: harmonyFade 1.5s ease-out forwards;
}

@keyframes harmonyFade {
  0%   { opacity: 0; }
  18%  { opacity: 1; }
  100% { opacity: 0; }
}

.ticker {
  position: absolute;
  left: 0; right: 0;
  bottom: 6px;
  text-align: center;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(40, 30, 20, 0.6);
  pointer-events: none;
}

@keyframes quake {
  0%   { transform: translate(0, 0) rotate(0); }
  25%  { transform: translate(-1px, 1px) rotate(0.1deg); }
  50%  { transform: translate(1px, -1px) rotate(-0.1deg); }
  75%  { transform: translate(-1px, -1px) rotate(0.08deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

#stage.shaking {
  animation: quake 0.6s linear infinite;
}
