/* Complaint Crusher — embed styles.
   Game colors live in CONFIG.COLORS inside game.js; these are shell/UI only. */

@font-face {
  font-family: "EasyLemon Space";
  src: url("space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

* { box-sizing: border-box; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

html, body {
  margin: 0;
  padding: 0;
  background: #f6f4ed;
  font-family: "EasyLemon Space", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.pmg-embed {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
}

/* Keeps the 1280x560 logical world's aspect while letting the canvas letterbox inside. */
.pmg-stage {
  position: relative;
  container-type: inline-size;   /* UI chrome scales to the embed, not the viewport */
  width: 100%;
  aspect-ratio: 1280 / 560;
  max-height: 100svh;
  overflow: hidden;
  border-radius: 14px;
  background: #fff5bd;
  touch-action: manipulation;
}

#game {
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
  outline: none;
  touch-action: none;      /* pointer drags never scroll the host page */
  cursor: grab;
}
#game.is-dragging { cursor: grabbing; }
#game:focus-visible { box-shadow: inset 0 0 0 4px #ff7043; border-radius: 12px; }

.pmg-panel {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(84%, 420px);
  padding: 22px 24px 24px;
  text-align: center;
  background: #fffaf0;
  border: 3px solid #171717;
  border-radius: 20px;
  box-shadow: 0 5px 0 #171717;
  animation: pmg-pop .22s ease-out;
}
.pmg-panel[hidden] { display: none; }
.pmg-panel h2 { margin: 0 0 6px; font-size: clamp(20px, 3.4vw, 30px); color: #171717; }
.pmg-panel p  { margin: 0 0 16px; font-size: clamp(13px, 2vw, 16px); color: #5d605b; line-height: 1.4; }

.pmg-cta {
  font: inherit;
  font-weight: 700;
  font-size: clamp(14px, 2.1vw, 17px);
  color: #fff;
  background: #ff7043;
  border: 3px solid #171717;
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  box-shadow: 0 3px 0 #171717;
}
.pmg-cta:active { transform: translateY(3px); box-shadow: 0 0 0 #14120e; }

/* Narrow embeds: shrink the chrome so it never crowds the playfield. */
@container (max-width: 720px) {
  .pmg-panel { padding: 16px 18px 18px; border-width: 2px; border-radius: 16px; box-shadow: 0 4px 0 #171717; }
  .pmg-panel h2 { font-size: 19px; }
  .pmg-panel p  { font-size: 12px; margin-bottom: 11px; }
  .pmg-cta { font-size: 13px; padding: 8px 15px; border-width: 2px; }
}
@container (max-width: 440px) {
  .pmg-panel h2 { font-size: 16px; }
  .pmg-panel p  { font-size: 11px; }
  .pmg-cta { font-size: 12px; padding: 7px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .pmg-panel { animation: none; }
}
@keyframes pmg-pop {
  from { transform: translate(-50%, -50%) scale(.9); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
