:root {
  color-scheme: light;
  --ink: #211814;
  --muted: #6c574c;
  --line: #dacfc2;
  --paper: #fffdf7;
  --accent: #2d8f78;
  --accent-strong: #176855;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(45, 143, 120, 0.18), transparent 28rem),
    linear-gradient(135deg, #f8faf7 0%, #fff8ed 44%, #eaf4f1 100%);
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 2.5vw, 2.5rem);
}

.bear-frame {
  position: relative;
  width: min(100%, 1248px);
  aspect-ratio: 1248 / 768;
}

.bear-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 34px rgba(39, 25, 16, 0.14));
}

.phone-screen {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 238, 0.96)),
    repeating-linear-gradient(
      -5deg,
      rgba(45, 143, 120, 0.05) 0,
      rgba(45, 143, 120, 0.05) 1px,
      transparent 1px,
      transparent 14px
    );
  clip-path: polygon(19.2% 15.6%, 42.9% 11.8%, 45.6% 77.7%, 23.1% 82.9%);
  pointer-events: none;
}

.screen-content {
  position: absolute;
  left: 19.6%;
  top: 15.4%;
  width: 24%;
  height: 66.3%;
  display: grid;
  grid-template-rows: auto 1fr 1.05fr;
  gap: clamp(0.25rem, 0.75vw, 0.65rem);
  padding: clamp(0.55rem, 1.25vw, 1rem) clamp(0.45rem, 1.15vw, 0.9rem);
  transform: rotate(-5.4deg);
  transform-origin: 50% 50%;
  overflow: hidden;
}

.wallet-link {
  position: absolute;
  left: 22.4%;
  top: 80.4%;
  width: 22.8%;
  transform: rotate(-5.4deg);
  transform-origin: 50% 50%;
}

.kicker,
.label,
.support,
.wallet-link,
.metric strong {
  letter-spacing: 0;
  max-width: 100%;
  white-space: nowrap;
}

.kicker {
  margin: 0;
  color: var(--accent-strong);
  font-size: clamp(0.7rem, 1.55vw, 1.35rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
}

.metric {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(0.25rem, 0.65vw, 0.55rem);
  border-top: 1px solid var(--line);
  text-align: center;
}

.label {
  color: var(--muted);
  font-size: clamp(0.62rem, 1.18vw, 1.02rem);
  font-weight: 700;
  text-transform: uppercase;
}

.metric strong {
  color: var(--ink);
  font-size: clamp(1.35rem, 2.65vw, 2.72rem);
  line-height: 0.9;
  font-weight: 900;
}

#countdown {
  font-size: clamp(1.08rem, 2.1vw, 2.05rem);
}

.support {
  color: var(--muted);
  font-size: clamp(0.58rem, 1.08vw, 0.94rem);
  line-height: 1.15;
}

.wallet-link {
  border: 1px solid rgba(45, 143, 120, 0.35);
  border-radius: 6px;
  color: #ffffff;
  background: var(--accent);
  padding: clamp(0.3rem, 0.72vw, 0.55rem) 0.4rem;
  font-size: clamp(0.58rem, 1vw, 0.86rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(45, 143, 120, 0.18);
}

.wallet-link:focus-visible {
  outline: 3px solid rgba(23, 104, 85, 0.35);
  outline-offset: 2px;
}

.music-toggle {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: clamp(0.75rem, 2vw, 1.5rem);
  z-index: 10;
  border: 1px solid rgba(33, 24, 20, 0.16);
  border-radius: 6px;
  color: #ffffff;
  background: #211814;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(33, 24, 20, 0.18);
  cursor: pointer;
}

.music-toggle:focus-visible {
  outline: 3px solid rgba(45, 143, 120, 0.35);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .stage {
    display: block;
    min-height: 100svh;
    padding: clamp(0.4rem, 1.6svh, 0.9rem) 0 5.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .bear-frame {
    width: min(218vw, 860px);
    margin: 0 0 0 clamp(0.75rem, 3.5vw, 1.5rem);
    transform: none;
  }

  .metric strong {
    font-size: clamp(0.92rem, 4.15vw, 1.32rem);
  }

  #countdown {
    font-size: clamp(0.8rem, 3.35vw, 1.06rem);
  }

  .kicker {
    font-size: clamp(0.52rem, 2.45vw, 0.78rem);
  }

  .label {
    font-size: clamp(0.55rem, 2.45vw, 0.78rem);
  }

  .support {
    font-size: clamp(0.45rem, 2.1vw, 0.68rem);
  }

  .wallet-link {
    font-size: clamp(0.56rem, 2.65vw, 0.82rem);
    padding: clamp(0.28rem, 1.6vw, 0.5rem) 0.35rem;
  }

  .music-toggle {
    right: auto;
    left: 50%;
    bottom: 0.75rem;
    transform: translateX(-50%);
    padding: 0.62rem 0.78rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 430px) {
  .screen-content {
    gap: 0.22rem;
    padding: 0.5rem 0.38rem;
  }
}

@media (max-width: 360px) {
  .metric strong {
    font-size: clamp(0.86rem, 3.9vw, 1.22rem);
  }

  #countdown {
    font-size: clamp(0.76rem, 3.15vw, 0.96rem);
  }
}
