/* Transparent embed: the WordPress page's own background remains visible. */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: transparent !important;
  font-family: Arial, Helvetica, sans-serif;
  color: #75453e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.game-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 12px 18px;
  background: transparent !important;
  overflow: visible;
}
.draw-screen, .result-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background: transparent !important;
}
.box-stage {
  width: min(100%, 560px);
  height: clamp(300px, 58vw, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.box-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 70%;
  filter: drop-shadow(0 12px 12px rgba(73, 35, 17, .12));
}
.box-stage.shaking .box-image { animation: boxShake .13s linear infinite; }
.box-stage.reveal .box-image { animation: boxReveal .65s ease-out both; }
@keyframes boxShake {
  0%,100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-3px) rotate(-1deg); }
  75% { transform: translateX(3px) rotate(1deg); }
}
@keyframes boxReveal {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(3px) scale(.98); }
}
.primary-button, .secondary-button {
  display: block;
  width: min(100%, 720px);
  min-height: 72px;
  border: 0;
  border-radius: 999px;
  padding: 18px 24px;
  font-size: clamp(18px, 2.3vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  transition: transform .18s ease, filter .18s ease;
}
.primary-button { color: #fff; background: #df9690; }
.secondary-button { color: #75453e; background: #f4d6d1; }
.primary-button:hover, .secondary-button:hover { transform: translateY(-1px); filter: brightness(.98); }
button:focus-visible { outline: 3px solid #236b4b; outline-offset: 3px; }
.status-text { min-height: 1.5em; margin: 14px 0 0; text-align: center; font-size: clamp(15px, 2vw, 22px); color: inherit; }
.fortune-image { display: block; width: auto; height: auto; max-width: min(100%, 500px); max-height: 78vh; object-fit: contain; margin: 0 auto 20px; }
.result-actions { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.share-overlay {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, .54);
}
.share-modal {
  position: relative;
  width: min(100%, 690px);
  max-height: min(90vh, 900px);
  overflow-y: auto;
  padding: 48px 30px 26px;
  border-radius: 34px;
  background: #fffaf3;
  color: #75453e;
  text-align: center;
  box-shadow: 0 18px 60px rgba(0,0,0,.22);
}
.share-modal h2 { margin: 0 22px 18px; font-size: clamp(25px, 4vw, 42px); line-height: 1.15; color: #75453e; }
.share-description { max-width: 550px; margin: 0 auto 28px; font-size: clamp(16px, 2.4vw, 23px); line-height: 1.5; }
.close-button { position: absolute; top: 14px; right: 18px; width: 42px; height: 42px; border: 0; background: transparent; color: #75453e; font-size: 38px; line-height: 1; cursor: pointer; }
.share-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; margin: 0 auto; }
.share-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-width: 0; min-height: 112px; padding: 14px 6px; border: 0; border-radius: 22px; background: #f4d6d1; color: #75453e; font-size: clamp(13px, 1.9vw, 19px); font-weight: 700; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.share-btn:hover { background: #e8b8b0; transform: translateY(-2px); }
.share-icon { display: block; font-size: 35px; font-weight: 700; line-height: 1; }
.instagram-icon { width: 32px; height: 32px; border: 4px solid currentColor; border-radius: 9px; font-size: 29px; line-height: 20px; }
.whatsapp-icon { width: 31px; height: 31px; border: 3px solid currentColor; border-radius: 50%; font-size: 26px; line-height: 23px; transform: rotate(-35deg); }
.share-feedback { min-height: 1.3em; margin: 14px 0 0; font-size: 14px; }
.instagram-note { margin: 8px auto 0; max-width: 520px; color: #89655f; font-size: 13px; line-height: 1.45; }
@media (max-width: 480px) {
  .game-shell { padding: 6px 8px 12px; }
  .box-stage { height: min(112vw, 470px); }
  .primary-button, .secondary-button { min-height: 58px; padding: 14px 18px; }
  .share-modal { padding: 46px 16px 20px; border-radius: 26px; }
  .share-options { gap: 8px; }
  .share-btn { min-height: 86px; border-radius: 16px; gap: 8px; }
  .share-icon { font-size: 29px; }
  .instagram-icon { width: 27px; height: 27px; font-size: 24px; line-height: 17px; border-width: 3px; }
}
