* {
  box-sizing: border-box;
}

:root {
  --bg: #f7efd7;
  --paper: #fff5ae;
  --paper-2: #fff9ce;
  --ink: #181818;
  --muted: #605a4f;
  --stage: #efe8d7;
  --stage-border: #d6cdbb;
  --shadow: rgba(35, 31, 26, 0.24);
  --pink: #ef7e9b;
  --black: #111113;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 50% 5%, rgba(255,255,255,0.42), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
}

.app {
  width: min(100%, 780px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.note-card {
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  border: 2px solid rgba(41, 38, 31, 0.16);
  border-radius: 18px;
  box-shadow: 10px 12px 0 var(--shadow);
}

.hero {
  padding: 20px 22px;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: clamp(2.4rem, 11vw, 5rem);
  letter-spacing: -0.07em;
  font-weight: 900;
  line-height: 0.9;
}

.hero p {
  margin: 0;
  font-size: clamp(0.98rem, 4vw, 1.25rem);
  letter-spacing: -0.035em;
}

.stage-card {
  position: relative;
  padding: 10px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  border: 2px solid rgba(41, 38, 31, 0.15);
  box-shadow: 10px 12px 0 var(--shadow);
}

.bug-stage {
  position: relative;
  width: 100%;
  height: clamp(300px, 54vh, 430px);
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,0.58), transparent 12rem),
    var(--stage);
}

.bug-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(92px, 26vw, 138px);
  height: clamp(92px, 26vw, 138px);
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 5;
}

.bug-button:disabled {
  cursor: not-allowed;
}

.bug-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 9px rgba(0,0,0,0.22));
  user-select: none;
  -webkit-user-drag: none;
}

.bug-img.is-talking {
  animation: bugPop 0.16s ease-out, bugShake 0.42s ease-in-out;
}

@keyframes bugPop {
  from { transform: scale(0.94) rotate(-2deg); }
  to { transform: scale(1) rotate(0deg); }
}

@keyframes bugShake {
  0% { translate: 0 0; }
  20% { translate: -2px 1px; }
  40% { translate: 2px -1px; }
  60% { translate: -1px -2px; }
  80% { translate: 1px 2px; }
  100% { translate: 0 0; }
}

.speech-bubble {
  position: absolute;
  max-width: min(88%, 360px);
  min-width: 190px;
  padding: 14px 16px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fffdf4;
  box-shadow: 5px 6px 0 rgba(0,0,0,0.18);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 110ms ease, transform 110ms ease;
}

.speech-bubble.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: var(--tail-left, 50%);
  bottom: -14px;
  width: 20px;
  height: 20px;
  background: #fffdf4;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: rotate(45deg);
}

#speechText {
  display: block;
  font-size: clamp(1.05rem, 4.2vw, 1.55rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
  font-weight: 900;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.poke-card,
.complaint-card {
  padding: 16px;
}

.pokes-topline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
}

.pokes-topline strong {
  font-size: 1.8rem;
  line-height: 1;
}

.primary-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--black);
  color: #fff;
  padding: 14px 20px;
  min-height: 52px;
  font: inherit;
  font-weight: 900;
  letter-spacing: -0.035em;
  box-shadow: 0 6px 0 rgba(0,0,0,0.22);
  cursor: pointer;
}

.primary-btn:disabled {
  background: #817b5f;
  cursor: not-allowed;
  box-shadow: none;
}

.tiny-status {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.complaint-card label {
  display: block;
  margin-bottom: 10px;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.complaint-card textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  resize: none;
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 14px;
  background: #fffdf4;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  outline: none;
}

.complaint-card textarea:focus {
  border-color: #e75f86;
  box-shadow: 0 0 0 4px rgba(231, 95, 134, 0.18);
}

.complaint-card button {
  margin-top: 12px;
}

.legal {
  margin: 18px auto 0;
  max-width: 560px;
  text-align: center;
  color: rgba(20,20,20,0.55);
  font-size: 0.74rem;
  font-weight: 700;
}

.ad-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 22, 18, 0.66);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 100;
}

.ad-box {
  width: min(100%, 420px);
  padding: 22px;
  text-align: center;
}

.ad-box h2 {
  margin: 0 0 6px;
  font-size: 2rem;
  letter-spacing: -0.07em;
}

.ad-box p {
  margin: 0 0 16px;
}

.fake-ad {
  min-height: 190px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: linear-gradient(135deg, #ff8cad, #ffcfda);
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px;
}

.play-dot {
  width: 66px;
  height: 66px;
  border-radius: 999px;
  background: #fffdf4;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  box-shadow: 0 7px 0 rgba(0,0,0,0.18);
}

#countdown {
  font-size: 2.2rem;
  font-weight: 900;
}

.dev-skip {
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: rgba(0,0,0,0.45);
  text-decoration: underline;
  cursor: pointer;
}

@media (min-width: 720px) {
  .app {
    padding-top: 28px;
  }

  .hero {
    max-width: 560px;
  }

  .action-grid {
    grid-template-columns: 230px 1fr;
  }
}
