/* Uniflappy — landing + fullscreen web game */

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

html,
body {
  width: 100%;
  min-height: 100%;
  background: #3d9cff;
  font-family: "Press Start 2P", system-ui, monospace;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

body.on-landing {
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
}

body.on-game {
  overflow: hidden;
  height: 100%;
  touch-action: none;
}

.hidden {
  display: none !important;
}

/* =========================================================
   LANDING PAGE — designed layout + CSS logo (no screenshot)
   ========================================================= */
.landing {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #3d9cff;
  overflow-x: hidden;
}

/* --- Sky scene (pure CSS) --- */
.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.sky-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    #2f8fff 0%,
    #5eb0ff 42%,
    #8fd0ff 72%,
    #a8e0ff 100%
  );
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow:
    22px 6px 0 -2px rgba(255, 255, 255, 0.92),
    -20px 8px 0 -4px rgba(255, 255, 255, 0.9),
    0 10px 0 -2px rgba(255, 255, 255, 0.88);
  opacity: 0.95;
  animation: cloudDrift 28s linear infinite;
}

.cloud.c1 { width: 70px; height: 28px; top: 14%; left: 8%; animation-duration: 32s; }
.cloud.c2 { width: 90px; height: 34px; top: 22%; right: 12%; left: auto; animation-duration: 38s; animation-delay: -8s; }
.cloud.c3 { width: 56px; height: 22px; top: 38%; left: 22%; animation-duration: 26s; animation-delay: -14s; }
.cloud.c4 { width: 64px; height: 24px; top: 18%; left: 55%; animation-duration: 40s; animation-delay: -4s; }

@keyframes cloudDrift {
  0% { transform: translateX(0); }
  50% { transform: translateX(18px); }
  100% { transform: translateX(0); }
}

.city-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 88px;
  height: 120px;
  background:
    linear-gradient(180deg, transparent 0%, rgba(100, 90, 180, 0.15) 100%),
    repeating-linear-gradient(
      90deg,
      transparent 0 18px,
      rgba(90, 80, 160, 0.35) 18px 52px,
      transparent 52px 70px,
      rgba(110, 100, 190, 0.28) 70px 110px,
      transparent 110px 130px
    );
  mask-image: linear-gradient(180deg, transparent 0%, #000 40%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 40%);
  opacity: 0.55;
}

.city-line::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40px 90px at 12% 100%, rgba(90, 80, 170, 0.55) 0 60%, transparent 62%),
    radial-gradient(ellipse 55px 110px at 28% 100%, rgba(100, 90, 185, 0.5) 0 60%, transparent 62%),
    radial-gradient(ellipse 35px 70px at 45% 100%, rgba(85, 75, 160, 0.5) 0 60%, transparent 62%),
    radial-gradient(ellipse 60px 120px at 62% 100%, rgba(95, 85, 175, 0.52) 0 60%, transparent 62%),
    radial-gradient(ellipse 42px 85px at 78% 100%, rgba(100, 90, 180, 0.48) 0 60%, transparent 62%),
    radial-gradient(ellipse 50px 100px at 92% 100%, rgba(90, 80, 165, 0.5) 0 60%, transparent 62%);
}

.hills {
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: 52px;
  height: 70px;
  background: #4fc45c;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow:
    -120px 10px 0 -10px #3a9e48,
    140px 8px 0 -8px #3a9e48,
    0 -8px 0 #5ad65a;
}

.ground-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background:
    linear-gradient(180deg, #5ad65a 0 14px, #c4783a 14px 100%);
  border-top: 3px solid #1a1a2e;
  box-shadow: inset 0 18px 0 -12px #3eb848;
}

/* Top CA bar */
.ca-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(12, 18, 40, 0.9);
  border-bottom: 3px solid #1a1a2e;
  backdrop-filter: blur(10px);
  cursor: pointer;
  flex-wrap: wrap;
}

.ca-label {
  font-size: clamp(0.45rem, 1.6vw, 0.55rem);
  color: #ffd84d;
  background: #c44dff;
  padding: 4px 8px;
  border: 2px solid #1a1a2e;
  border-radius: 4px;
  text-shadow: 1px 1px 0 #1a1a2e;
}

.ca-value {
  font-size: clamp(0.45rem, 1.8vw, 0.6rem);
  color: #fff;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 #1a1a2e;
}

.ca-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid #1a1a2e;
  border-radius: 6px;
  background: #ff4da6;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.ca-copy:active {
  transform: scale(0.94);
}

/* Nav */
.landing-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(14px, 3vw, 28px);
  gap: 12px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(0.45rem, 1.8vw, 0.65rem);
  color: #fff;
  text-shadow: 2px 2px 0 #1a1a2e;
  letter-spacing: 0.06em;
}

.nav-bird {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.25));
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: clamp(0.45rem, 1.6vw, 0.55rem);
  text-decoration: none;
  border: 3px solid #1a1a2e;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s;
}

.btn-x {
  background: #0f0f0f;
  color: #fff;
  box-shadow: 0 4px 0 #000;
  min-width: 44px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.btn-x:hover { filter: brightness(1.15); }
.btn-x:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #000;
}

.btn-buy {
  background: linear-gradient(180deg, #ffd84d, #f0b400);
  color: #1a1a2e;
  box-shadow: 0 4px 0 #b8860b;
  min-width: 88px;
}

.btn-buy:hover { filter: brightness(1.06); }
.btn-buy:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #b8860b;
}

/* Hero */
.landing-hero {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 16px 48px;
  gap: 20px;
}

/* ---------- CSS logo (recreates reference text style) ---------- */
.logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15em;
  margin: 0;
  padding: 0 8px;
  animation: logoPop 0.55s cubic-bezier(0.34, 1.35, 0.64, 1);
  filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.18));
}

@keyframes logoPop {
  from { transform: scale(0.88); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 0.15em;
}

.word {
  font-family: "Press Start 2P", system-ui, monospace;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  -webkit-text-stroke: 0;
}

/* UNI — hot pink → purple */
.word-uni {
  font-size: clamp(2.4rem, 11vw, 5.2rem);
  background: linear-gradient(
    180deg,
    #ffb6e8 0%,
    #ff5ec8 28%,
    #ff3db0 55%,
    #c44dff 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 3px 0 #1a1a2e)
    drop-shadow(0 6px 0 #1a1a2e)
    drop-shadow(3px 0 0 #1a1a2e)
    drop-shadow(-3px 0 0 #1a1a2e)
    drop-shadow(0 -2px 0 #1a1a2e)
    drop-shadow(0 0 18px rgba(255, 90, 200, 0.45));
}

/* FLAPPY — white → soft blue */
.word-flappy {
  font-size: clamp(1.55rem, 7.2vw, 3.4rem);
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f0f7ff 35%,
    #c8e0ff 70%,
    #9ec8ff 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 3px 0 #1a3a7a)
    drop-shadow(0 5px 0 #1a3a7a)
    drop-shadow(3px 0 0 #1a3a7a)
    drop-shadow(-3px 0 0 #1a3a7a)
    drop-shadow(0 -2px 0 #1a3a7a)
    drop-shadow(0 0 12px rgba(100, 160, 255, 0.35));
}

/* Pixel-ish wings */
.wing {
  width: clamp(36px, 9vw, 72px);
  height: clamp(28px, 7vw, 56px);
  position: relative;
  flex-shrink: 0;
  background:
    linear-gradient(145deg, #ffffff 0%, #f0f4ff 50%, #dce8ff 100%);
  border: 3px solid #1a1a2e;
  border-radius: 60% 40% 50% 50% / 55% 45% 55% 45%;
  box-shadow:
    inset -4px -4px 0 rgba(140, 170, 220, 0.35),
    inset 4px 4px 0 rgba(255, 255, 255, 0.7),
    0 3px 0 #1a1a2e;
}

.wing::before,
.wing::after {
  content: "";
  position: absolute;
  background: linear-gradient(180deg, #fff 0%, #e8f0ff 100%);
  border: 2px solid #1a1a2e;
  border-radius: 50%;
}

.wing::before {
  width: 42%;
  height: 55%;
  top: 18%;
  left: 8%;
}

.wing::after {
  width: 32%;
  height: 42%;
  top: 28%;
  right: 10%;
}

.wing-l {
  transform: scaleX(-1) rotate(-8deg);
  margin-right: -4px;
}

.wing-r {
  transform: rotate(-8deg);
  margin-left: -4px;
}

.sparkle {
  position: absolute;
  top: -0.15em;
  right: -0.05em;
  font-size: clamp(0.7rem, 2.5vw, 1.2rem);
  color: #ffd84d;
  text-shadow:
    0 0 8px rgba(255, 216, 77, 0.9),
    2px 2px 0 #1a1a2e;
  animation: sparklePulse 1.4s ease-in-out infinite;
}

@keyframes sparklePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.15); }
}

/* Purple ribbon */
.logo-ribbon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  margin-top: 0.55em;
  padding: 0.55em 1.35em;
  background: linear-gradient(180deg, #d070ff 0%, #a040e8 45%, #7a20c8 100%);
  border: 3px solid #1a1a2e;
  border-radius: 8px;
  box-shadow:
    0 4px 0 #1a1a2e,
    0 6px 0 rgba(0, 0, 0, 0.12),
    inset 0 2px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  transform: perspective(400px) rotateX(4deg);
}

.logo-ribbon::before,
.logo-ribbon::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px;
  height: 70%;
  background: #6a18b0;
  border: 2px solid #1a1a2e;
  z-index: -1;
}

.logo-ribbon::before {
  left: -14px;
  transform: translateY(-50%) skewY(-18deg);
  border-radius: 4px 0 0 4px;
}

.logo-ribbon::after {
  right: -14px;
  transform: translateY(-50%) skewY(18deg);
  border-radius: 0 4px 4px 0;
}

.ribbon-text {
  font-size: clamp(0.42rem, 1.8vw, 0.72rem);
  color: #fff;
  letter-spacing: 0.06em;
  text-shadow: 2px 2px 0 #4a1080;
  white-space: nowrap;
}

.ribbon-star {
  color: #ffd84d;
  font-size: clamp(0.55rem, 2vw, 0.85rem);
  text-shadow: 1px 1px 0 #1a1a2e;
}

/* Bird + gems */
.hero-bird-float {
  position: relative;
  margin-top: 4px;
  width: min(160px, 38vw);
  height: min(140px, 34vw);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bird {
  width: min(110px, 28vw);
  height: auto;
  image-rendering: pixelated;
  animation: floatBird 1.5s ease-in-out infinite;
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.16));
  z-index: 2;
}

.hero-gem {
  position: absolute;
  width: min(36px, 9vw);
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 8px rgba(224, 102, 255, 0.7));
  animation: gemBob 2s ease-in-out infinite;
}

.hero-gem.g1 {
  left: 0;
  top: 8%;
  animation-delay: 0s;
}

.hero-gem.g2 {
  right: 0;
  bottom: 12%;
  animation-delay: 0.6s;
  width: min(28px, 7vw);
}

@keyframes gemBob {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-10px) rotate(8deg); }
}

.hero-tag {
  font-size: clamp(0.38rem, 1.5vw, 0.5rem);
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 2px 2px 0 #1a1a2e;
  line-height: 1.7;
  max-width: 90vw;
}

.hero-cta {
  margin-top: 2px;
}

.btn-play {
  font-family: inherit;
  font-size: clamp(0.55rem, 2.2vw, 0.75rem);
  letter-spacing: 0.08em;
  padding: 1.15rem 2rem;
  border: 3px solid #1a1a2e;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff9ad8, #ff4da6);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 0 #b02070;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
  animation: playPulse 1.6s ease-in-out infinite;
}

.btn-play:hover { filter: brightness(1.06); }
.btn-play:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #b02070;
  animation: none;
}

@keyframes playPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* CA card */
.ca-card {
  margin-top: 6px;
  width: min(420px, 92vw);
  background: rgba(255, 250, 240, 0.96);
  color: #1a1a2e;
  border: 4px solid #1a1a2e;
  border-radius: 12px;
  padding: 1.05rem 1.15rem;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.18);
  text-align: center;
  backdrop-filter: blur(4px);
}

.ca-card-label {
  font-size: 0.4rem;
  color: #888;
  margin-bottom: 0.55rem;
  letter-spacing: 0.08em;
}

.ca-card-value {
  font-size: clamp(0.5rem, 2vw, 0.65rem);
  color: #c44dff;
  letter-spacing: 0.04em;
}

.ca-card-note {
  margin-top: 0.65rem;
  font-size: 0.35rem;
  color: #999;
  line-height: 1.6;
}

.landing-footer {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  font-size: clamp(0.32rem, 1.2vw, 0.42rem);
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 1px 1px 0 #1a1a2e;
}

.landing-footer .dot { opacity: 0.6; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  z-index: 100;
  background: #1a1a2e;
  color: #fff;
  border: 3px solid #ffd84d;
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  font-size: clamp(0.4rem, 1.5vw, 0.5rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 420px) {
  .nav-brand span { display: none; }
  .logo-ribbon {
    padding: 0.5em 0.85em;
  }
  .ribbon-text {
    letter-spacing: 0.02em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cloud,
  .sparkle,
  .hero-bird,
  .hero-gem,
  .btn-play,
  .logo-block {
    animation: none;
  }
}

/* =========================================================
   GAME
   ========================================================= */
.game-root {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #4da6ff;
  cursor: pointer;
  z-index: 1;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ---------- HUD ---------- */
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 16px 0;
  pointer-events: none;
  gap: 8px;
}

.hud-left,
.hud-right {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.hud-label {
  font-size: clamp(0.4rem, 1.5vw, 0.55rem);
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 2px 2px 0 #1a1a2e;
}

.hud-label.gem {
  margin-left: 8px;
  color: #f0a0ff;
}

.hud-val {
  font-size: clamp(0.7rem, 2.5vw, 1.1rem);
  color: #ffd84d;
  text-shadow: 2px 2px 0 #1a1a2e;
}

.brand {
  font-size: clamp(0.45rem, 1.8vw, 0.7rem);
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow:
    2px 2px 0 #c44dff,
    0 0 12px rgba(196, 77, 255, 0.55);
}

/* ---------- Overlays ---------- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 40, 0.42);
  padding: 16px;
  animation: fadeIn 0.25s ease;
}

.overlay.hidden {
  display: none !important;
}

#overlay-ready {
  background: rgba(10, 14, 40, 0.12);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Panels ---------- */
.panel {
  background: linear-gradient(180deg, #fffaf0 0%, #fff3d6 100%);
  color: #1a1a2e;
  border: 4px solid #1a1a2e;
  border-radius: 14px;
  padding: 1.6rem 1.35rem 1.4rem;
  text-align: center;
  width: min(380px, 92vw);
  box-shadow:
    8px 8px 0 rgba(0, 0, 0, 0.22),
    0 0 0 3px rgba(196, 77, 255, 0.25);
  animation: popIn 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes popIn {
  from {
    transform: scale(0.88);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.panel-bird {
  width: min(110px, 30vw);
  height: auto;
  object-fit: contain;
  margin: 0 auto 0.9rem;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.12));
  pointer-events: none;
  animation: floatBird 1.4s ease-in-out infinite;
  image-rendering: pixelated;
}

@keyframes floatBird {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.panel h1,
.panel h2 {
  font-size: clamp(0.9rem, 3.8vw, 1.25rem);
  margin-bottom: 0.55rem;
  color: #c44dff;
  text-shadow: 2px 2px 0 #ffd84d;
  letter-spacing: 0.04em;
}

.tagline {
  font-size: clamp(0.38rem, 1.5vw, 0.48rem) !important;
  color: #888 !important;
  margin-bottom: 0.85rem !important;
  letter-spacing: 0.04em;
}

.howto {
  font-size: clamp(0.4rem, 1.55vw, 0.5rem) !important;
  line-height: 1.9 !important;
  color: #444 !important;
  margin-bottom: 1.15rem !important;
}

.panel p {
  font-size: clamp(0.4rem, 1.6vw, 0.5rem);
  line-height: 1.8;
  color: #444;
  margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: inherit;
  font-size: clamp(0.55rem, 2vw, 0.7rem);
  letter-spacing: 0.08em;
  padding: 1rem 1.5rem;
  border: 3px solid #1a1a2e;
  cursor: pointer;
  border-radius: 10px;
  width: 100%;
  max-width: 260px;
  display: inline-block;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-primary {
  background: linear-gradient(180deg, #ff9ad8, #ff4da6);
  color: #fff;
  box-shadow: 0 5px 0 #b02070;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #b02070;
}

.btn-ghost {
  margin-top: 0.7rem;
  background: #fff;
  color: #1a1a2e;
  box-shadow: 0 4px 0 #bbb;
  max-width: 260px;
}

.btn-ghost:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #bbb;
}

.hint {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
  color: #999 !important;
}

/* ---------- Ready ---------- */
.ready-msg {
  text-align: center;
  pointer-events: none;
}

.get-ready {
  font-size: clamp(1rem, 5vw, 1.65rem);
  color: #fff;
  text-shadow:
    4px 4px 0 #1a1a2e,
    0 0 18px rgba(255, 107, 181, 0.65);
  margin-bottom: 0.9rem;
  animation: pulse 0.9s ease-in-out infinite;
}

.tap {
  font-size: clamp(0.45rem, 2vw, 0.65rem);
  color: #ffd84d;
  text-shadow: 2px 2px 0 #1a1a2e;
  margin-bottom: 1.2rem;
}

.ready-bird-wrap {
  display: flex;
  justify-content: center;
}

.ready-bird {
  width: min(72px, 18vw);
  height: auto;
  image-rendering: pixelated;
  animation: floatBird 1s ease-in-out infinite;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.2));
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.88; }
}

/* ---------- Scoreboard ---------- */
.scoreboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.scoreboard .label {
  display: block;
  font-size: 0.35rem;
  color: #888;
  margin-bottom: 0.4rem;
}

.scoreboard .val {
  display: block;
  font-size: clamp(0.7rem, 3vw, 0.95rem);
  color: #c44dff;
}

.new-best {
  color: #e6a800 !important;
  font-size: 0.5rem !important;
  margin-bottom: 0.85rem !important;
  animation: pulse 0.8s ease-in-out infinite;
}

/* ---------- Footer ---------- */
.footer-hint {
  position: absolute;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  z-index: 12;
  text-align: center;
  font-size: clamp(0.32rem, 1.2vw, 0.42rem);
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 1px 1px 0 #1a1a2e;
  pointer-events: none;
  letter-spacing: 0.04em;
  padding: 0 12px;
}

.game-root.playing .footer-hint,
.game-root.ready .footer-hint {
  opacity: 0;
  transition: opacity 0.3s;
}

@media (max-width: 480px) {
  .brand {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel-bird,
  .ready-bird,
  .get-ready,
  .new-best {
    animation: none;
  }
}
