/* Compact layout for the X Player Card iframe (~480x480, may be scaled down). */
html, body { height: 100%; overflow: hidden; font-size: 16px; }

#app {
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  padding: 40px 16px 12px;
}

.embed-brand {
  position: fixed;
  top: 8px;
  right: 10px;
  z-index: 50;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #6b6b80;
  text-decoration: none;
  padding: 5px 9px;
  border: 1px solid #dddde4;
  border-radius: 999px;
  background: #fff;
}

/* Title screen */
.embed #title-screen { overflow-y: auto; min-height: 0; }
.embed .daily-hdr { margin-bottom: 8px; }
.embed .daily-badge { margin-bottom: 2px; }
.embed .daily-date, .embed .daily-streak { font-size: 12px; }
.embed .daily-done { margin: 8px 0; padding: 10px; }
.embed .daily-done-score { font-size: 26px; }
.embed .daily-hub-link { margin-top: 8px; padding: 10px 24px; font-size: 14px; }
.embed .title-icon { font-size: inherit; margin: 0; }
.embed .game-title { font-size: clamp(26px, 8.5vmin, 40px); letter-spacing: 4px; white-space: nowrap; }
.embed .tagline { font-size: 11px; letter-spacing: 2px; margin-top: 4px; }
.embed-example { display: flex; gap: 6px; justify-content: center; align-items: center; margin: 16px 0 6px; }
.embed-example .seq-num { min-width: 40px; height: 40px; font-size: 18px; padding: 0 8px; border-radius: 8px; }
.embed-example .seq-num.mystery { min-width: 44px; animation: none; }
.embed-howto { font-size: 12px; color: var(--text-dim); letter-spacing: 0.5px; margin-bottom: 16px; }
.embed .btn-main { min-height: 50px; font-size: 16px; }
.embed .best-score { margin-top: 8px; font-size: 12px; }
.embed #title-screen:has(.daily-done) .embed-example,
.embed #title-screen:has(.daily-done) .embed-howto { display: none; }

/* Game screen */
.embed .game-header { margin-bottom: 6px; }
.embed .round-label { font-size: 12px; }
.embed .score-label { font-size: 18px; }
.embed .progress-bar { margin-bottom: 8px; }
.embed .seq-section { gap: 12px; padding: 6px 0 0; }
.embed .seq-label { font-size: 11px; }
.embed .seq-row { gap: 4px 5px; }
.embed .seq-num { min-width: 34px; height: 36px; font-size: 17px; padding: 0 7px; border-radius: 8px; }
.embed .seq-num.mystery { min-width: 40px; font-size: 17px; }
.embed .seq-arrow { font-size: 14px; }
.embed .choices { grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 440px; }
.embed .choice-btn { padding: 10px 2px; font-size: clamp(14px, 4.4vmin, 19px); border-width: 2px; border-radius: 10px; overflow-wrap: anywhere; }
.embed .feedback { margin-top: 10px; }
.embed .feedback-result { font-size: 17px; margin-bottom: 2px; }
.embed .feedback-hint { font-size: 13px; line-height: 1.35; margin-bottom: 10px; }
.embed .btn-next { min-height: 44px; font-size: 15px; max-width: 200px; }

/* Game over */
.embed .gameover-heading { font-size: 22px; letter-spacing: 3px; margin-bottom: 4px; }
.embed .final-score { font-size: 48px; margin-bottom: 2px; line-height: 1.1; }
.embed .final-rank { font-size: 16px; margin-bottom: 6px; }
.embed .final-stats { font-size: 13px; line-height: 1.6; margin-bottom: 14px; }
.embed-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.embed-actions .btn-share { margin: 0; padding: 12px 20px; font-size: 14px; text-decoration: none; }
.embed-more { background: var(--card) !important; color: var(--text) !important; border: 1.5px solid var(--card-border) !important; }
.embed #next-cd { font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--accent); margin-top: 12px; }

/* Small iframes (X scales the card down on narrow timelines) */
@media (max-height: 400px) {
  #app { padding-top: 34px; padding-bottom: 8px; }
  .embed .seq-section { gap: 8px; padding-top: 2px; }
  .embed .seq-num { height: 30px; min-width: 28px; font-size: 15px; padding: 0 5px; }
  .embed .seq-num.mystery { min-width: 34px; font-size: 15px; }
  .embed .choice-btn { padding: 7px 2px; }
  .embed .feedback { margin-top: 6px; }
  .embed .feedback-hint { margin-bottom: 6px; font-size: 12px; }
  .embed .btn-next { min-height: 38px; }
  .embed-example { margin-top: 10px; }
  .embed-example .seq-num { height: 34px; min-width: 34px; font-size: 16px; }
  .embed-howto { margin-bottom: 10px; }
  .embed .final-score { font-size: 40px; }
  .embed .final-stats { margin-bottom: 10px; }
  .embed #next-cd { margin-top: 8px; }
}
