/* Lila chat: game chips under her messages and the Wheel of Fate stage (games.js). */

.game-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 2px; }
.game-strip--waiting { visibility: hidden; }

.game-rps {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px;
  background: rgba(120, 16, 34, 0.35); border: 1px solid rgba(227, 192, 106, 0.45); color: #f6e7c8; font-size: 0.85rem;
}
.game-rps__hand { font-size: 1.35rem; line-height: 1; }

.game-cards { display: inline-flex; gap: 6px; }
.game-card {
  position: relative; display: inline-block; width: 38px; height: 54px; border-radius: 6px; background: #fbf6ee;
  border: 1px solid #c9b79a; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); color: #17111a; font-weight: 700;
}
.game-card--red { color: #c8182f; }
.game-card__corner { position: absolute; top: 3px; left: 4px; font-size: 0.72rem; line-height: 1; }
.game-card__suit { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; padding-top: 8px; }

.wheel-card {
  display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; max-width: 320px;
  background: linear-gradient(160deg, rgba(43, 9, 16, 0.92), rgba(20, 4, 10, 0.92));
  border: 1px solid rgba(227, 192, 106, 0.55); color: #f6e7c8;
}
.wheel-card__head { display: flex; align-items: center; gap: 8px; }
.wheel-card__title { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.78rem; color: #e3c06a; }
.wheel-card__list { margin: 0; padding-left: 1.4em; display: grid; gap: 2px; font-size: 0.88rem; }
.wheel-card__field { opacity: 0.62; }
.wheel-card__field--won { opacity: 1; font-weight: 700; color: #ffd36b; }
.wheel-card__field--won::marker { color: #ffd36b; }
.wheel-card__replay { justify-self: start; font-size: 0.8rem; }

/* ----- the stage ----- */
.wheel-stage {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(circle at 50% 45%, rgba(90, 10, 26, 0.55), rgba(6, 1, 4, 0.86) 70%); cursor: pointer;
}
.wheel-stage__scene { position: relative; width: min(86vw, 420px); height: min(86vw, 380px); }
.wheel-stage__wheel { position: absolute; left: 0; top: 0; width: min(74vw, 320px); height: min(74vw, 320px); }
.wheel-stage__spinner { width: 100%; height: 100%; transform-origin: 50% 50%; filter: drop-shadow(0 8px 26px rgba(215, 31, 54, 0.45)); }
.wheel-stage__spinner .wheel-svg { width: 100%; height: 100%; display: block; }
.wheel-stage__pointer { position: absolute; left: 50%; top: -14px; margin-left: -17px; transform-origin: 50% 0%; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); }
.wheel-stage__chibi { position: absolute; right: 0; bottom: 0; width: min(40vw, 170px); transform-origin: 50% 100%; }
.wheel-stage__chibi .chibi { width: 100%; height: auto; display: block; overflow: visible; }
.wheel-stage__result {
  min-height: 2.4em; max-width: min(90vw, 460px); padding: 8px 18px; border-radius: 999px; text-align: center;
  color: #ffe7a6; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; opacity: 0;
  background: rgba(43, 9, 16, 0.85); border: 1px solid rgba(227, 192, 106, 0.6); box-shadow: 0 0 28px rgba(215, 31, 54, 0.45);
}
.wheel-stage__result--shown { opacity: 1; }
.wheel-label { font-family: inherit; }

/* chibi parts move around their own joints */
.chibi-wing, .chibi-tail, .chibi-arm, .chibi-eyes { transform-box: fill-box; }
.chibi-wing--l { transform-origin: 100% 40%; }
.chibi-wing--r { transform-origin: 0% 40%; }
.chibi-tail { transform-origin: 0% 0%; }
.chibi-arm--r { transform-origin: 0% 100%; }
.chibi-eyes { transform-origin: 50% 50%; }
.chibi-eye-happy { display: none; }
.chibi--happy .chibi-eye-open { display: none; }
.chibi--happy .chibi-eye-happy { display: inline; }

@media (prefers-reduced-motion: reduce) {
  .wheel-stage__spinner { filter: none; }
}

/* ----- Throne gift card ----- */
.gift-card {
  display: grid; gap: 6px; padding: 10px 12px; margin: 6px 0 2px; border-radius: 12px; max-width: 320px;
  background: linear-gradient(160deg, rgba(43, 9, 16, 0.92), rgba(20, 4, 10, 0.92));
  border: 1px solid rgba(227, 192, 106, 0.55); color: #f6e7c8;
}
.gift-card__head { display: flex; align-items: center; gap: 8px; }
.gift-card__icon { font-size: 1.2rem; line-height: 1; }
.gift-card__title { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.78rem; color: #e3c06a; }
.gift-card__name { font-weight: 700; font-size: 0.95rem; overflow-wrap: anywhere; }
.gift-card__price { color: #ffd36b; font-weight: 700; font-size: 0.9rem; }
.gift-card__open { justify-self: start; text-decoration: none; }
.gift-card__code-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.85rem; }
.gift-card__code { padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.35); border: 1px dashed rgba(227, 192, 106, 0.6); color: #ffe7a6; letter-spacing: 0.06em; user-select: all; }
.gift-card__copy { font-size: 0.8rem; }
.gift-card__note { font-size: 0.76rem; opacity: 0.7; }
.gift-card__arrived { color: #9be3a4; font-weight: 700; font-size: 0.88rem; }
.gift-card--arrived { border-color: rgba(155, 227, 164, 0.6); }

/* ----- rock-paper-scissors: the hand picker under her message, the result in the user's ----- */
.rps-pick {
  display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; max-width: 320px;
  background: linear-gradient(160deg, rgba(43, 9, 16, 0.92), rgba(20, 4, 10, 0.92)); border: 1px solid rgba(227, 192, 106, 0.55); color: #f6e7c8;
}
.rps-pick__title { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.74rem; color: #e3c06a; }
.rps-pick__hands { display: flex; gap: 8px; }
.rps-pick__hand {
  flex: 1; display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; cursor: pointer;
  background: rgba(120, 16, 34, 0.35); border: 1px solid rgba(227, 192, 106, 0.45); color: #f6e7c8; font: inherit;
  transition: transform 0.12s ease, background 0.12s ease;
}
.rps-pick__hand:hover:not(:disabled), .rps-pick__hand:focus-visible { transform: translateY(-2px); background: rgba(154, 21, 48, 0.55); }
.rps-pick__hand:disabled { cursor: default; opacity: 0.45; }
.rps-pick__hand--chosen:disabled { opacity: 1; border-color: #ffd36b; }
.rps-pick__glyph { font-size: 1.9rem; line-height: 1.1; }
.rps-pick__name { font-size: 0.78rem; text-transform: capitalize; }

.rps-result {
  display: grid; gap: 6px; justify-items: center; padding: 10px 14px; border-radius: 12px; margin-left: auto; max-width: 300px;
  background: linear-gradient(160deg, rgba(43, 9, 16, 0.92), rgba(20, 4, 10, 0.92)); border: 1px solid rgba(227, 192, 106, 0.55); color: #f6e7c8;
}
.rps-result__hands { display: flex; align-items: center; gap: 14px; }
.rps-result__side { display: grid; justify-items: center; gap: 2px; }
.rps-result__hand { display: inline-block; font-size: 2.1rem; line-height: 1.1; }
.rps-result__who { font-size: 0.76rem; opacity: 0.8; }
.rps-result__vs { font-weight: 800; color: #e3c06a; font-size: 0.8rem; }
.rps-result__verdict { font-weight: 800; font-size: 1rem; }
.rps-result__verdict--hidden { visibility: hidden; }
.rps-result--win .rps-result__verdict { color: #9be3a4; }
.rps-result--lose .rps-result__verdict { color: #ff8a9a; }
.rps-result--draw .rps-result__verdict { color: #ffd36b; }

/* ----- the wheel on the table (not spun yet) ----- */
.wheel-card__preview { display: flex; justify-content: center; }
.wheel-card__preview .wheel-svg { width: min(200px, 60vw); height: auto; }
.wheel-card__field--open { opacity: 0.9; }
.wheel-card__note { font-size: 0.78rem; opacity: 0.75; }
.wheel-card__agree { justify-self: start; }
