:root {
  --navy: #1a2b4a;
  --navy-2: #243656;
  --cream: #f6efe4;
  --ink: #2a3344;
  --muted: #6b7382;
  --gold: #d4a017;
  --paper: #efe6d6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b1220;
  color: var(--cream);
  font-family: "Segoe UI", "Source Sans 3", system-ui, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.site-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 13px;
  background: linear-gradient(to bottom, rgba(11, 18, 32, 0.72), transparent);
  pointer-events: none;
}

.site-bar a {
  pointer-events: auto;
}

.top {
  display: none;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f4c430;
  color: var(--navy);
  font-weight: 800;
  display: grid;
  place-items: center;
  letter-spacing: 0.02em;
}

.brand .presents {
  margin: 0 0 3px;
  color: #c9d2df;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.brand h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1220;
  overflow: hidden;
}

.playfield {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  width: min(100vw, calc(100dvh * 16 / 9));
  height: min(100dvh, calc(100vw * 9 / 16));
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  background: #8ec8e8;
  outline: none;
}

.hud {
  position: absolute;
  inset: 12px 14px auto;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(20, 28, 40, 0.35);
}

.hud-left,
.hud-right {
  display: flex;
  gap: 14px;
  align-items: center;
}

.lives {
  display: flex;
  gap: 4px;
  font-size: 18px;
}

.heart {
  color: #e25555;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.2));
}

.heart.empty {
  color: rgba(255, 255, 255, 0.28);
}

.stat {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 26, 40, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f6efe4;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}

.stat img {
  display: block;
}

.stat.flame {
  color: #ffd14a;
}

.stat .label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d4c4a8;
  font-weight: 600;
}

.help {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  margin: 0;
  padding: 0 12px;
  color: #c9d2df;
  font-size: 12px;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

kbd {
  display: inline-block;
  min-width: 1.4em;
  padding: 1px 6px;
  margin: 0 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: inherit;
  font-size: 12px;
}

@media (max-width: 720px) {
  .brand .presents {
    font-size: 11px;
  }
  .help {
    font-size: 11px;
  }
}
