/* meme-laugh.css: scoped styles for Meme Laugh-Off. */

.ml-root { position: absolute; inset: 0; }

.ml-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  animation: mlViewIn 0.24s ease both;
}

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

.ml-loading,
.ml-empty {
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  text-align: center;
  padding: 6vh 6vw;
}

.ml-empty h2 {
  font-family: var(--disp);
  font-size: 2rem;
  margin: 0 0 0.3em;
}

.ml-empty p {
  margin: 0;
  color: var(--ink-dim);
}

.ml-empty code {
  display: inline-block;
  background: var(--paper);
  color: var(--accent);
  padding: 0.42em 0.8em;
  border-radius: 6px;
  border: 2px solid var(--outline);
  font-size: 1rem;
  margin: 0.1em 0;
  box-shadow: 3px 3px 0 var(--outline);
}

.ml-empty .btn { margin-top: 1rem; }

/* meme display */
.ml-show { padding: calc(env(safe-area-inset-top) + 54px) 3vw 0; }

.ml-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  padding: 1vh 0;
}

.ml-img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  box-shadow: 0 0 0 3px var(--outline), 8px 8px 0 oklch(19% 0.012 248 / 0.24);
  background: var(--paper);
}

.ml-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0.8rem 0.4rem calc(0.9rem + env(safe-area-inset-bottom));
}

.ml-count {
  font-family: var(--disp);
  color: var(--ink-dim);
  letter-spacing: 0;
  text-transform: uppercase;
}

.ml-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.ml-laugh-btn { font-size: 1.08rem; }

@media (min-width: 760px) {
  .ml-empty h2 { font-size: 3.2rem; }
  .ml-laugh-btn { font-size: 1.28rem; }
}

@media (max-width: 640px) {
  .ml-hud { justify-content: center; }
  .ml-count { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ml-view { animation: none; }
}
