:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: #030b12;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

button {
  font: inherit;
}

#ad {
  position: fixed;
  inset: 0;
  min-width: 280px;
  min-height: 210px;
  overflow: hidden;
  background: #030b12;
}

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

#game.targeting {
  cursor: crosshair;
}

#mini-cta {
  position: absolute;
  z-index: 4;
  top: max(9px, env(safe-area-inset-top));
  right: max(9px, env(safe-area-inset-right));
  min-width: 86px;
  height: 34px;
  padding: 0 13px;
  border: 2px solid #f1c665;
  border-radius: 5px;
  color: #fff0bd;
  background: #53371e;
  box-shadow: 0 3px 0 #1c140d;
  font-size: 14px;
  font-weight: 800;
}

#mini-cta.hidden {
  display: none;
}

#mini-cta:active,
#install-cta:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #1c140d;
}

#loading {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff0bd;
  background: #030b12;
  font-size: 24px;
  font-weight: 800;
}

#loading.ready {
  display: none;
}

#end-card {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(1, 8, 13, 0.84);
  animation: reveal 260ms ease-out both;
}

#end-card.hidden {
  display: none;
}

.end-card__panel {
  width: min(94%, 700px);
  min-height: 210px;
  padding: 20px 28px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  border: 3px solid #f1c665;
  border-radius: 7px;
  color: #fff0bd;
  background: #0a232c;
  box-shadow: 0 0 0 6px #03131c, 0 18px 34px rgba(0, 0, 0, 0.54);
}

.end-card__panel img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border: 2px solid #66cada;
  border-radius: 6px;
}

.end-card__copy {
  min-width: 0;
}

.end-card__eyebrow {
  margin: 0 0 3px;
  color: #71d7e9;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #fff0bd;
  font-size: clamp(31px, 6vw, 50px);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 3px 0 #071219;
}

h1 span {
  display: block;
  margin-top: 6px;
  color: #71d7e9;
  font-size: 0.48em;
}

#end-copy {
  margin: 11px 0 14px;
  color: #d5e3e1;
  font-size: 16px;
  line-height: 1.25;
}

#install-cta {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid #ffe39b;
  border-radius: 5px;
  color: #21170e;
  background: #e9ad3e;
  box-shadow: 0 4px 0 #70451d;
  font-size: 19px;
  font-weight: 900;
}

@keyframes reveal {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-height: 285px) {
  .end-card__panel {
    min-height: 0;
    padding: 12px 20px;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 16px;
  }

  .end-card__panel img {
    width: 76px;
    height: 76px;
  }

  h1 { font-size: 30px; }
  #end-copy { margin-block: 7px 9px; font-size: 14px; }
  #install-cta { min-height: 38px; font-size: 17px; }
}
