.playful-art { background-image: url('/playful-stickers.png'); background-size: 300% 200%; }
.sticker-detective { background-position: 0 0; }
.sticker-peek { background-position: 50% 0; }
.sticker-oops { background-position: 100% 0; }
.sticker-aha { background-position: 0 100%; }
.sticker-sleepy { background-position: 50% 100%; }
.sticker-puzzle { background-position: 100% 100%; }
.spark-burst { inset: 0; width: 100%; height: 100%; overflow: hidden; }
.burst-piece { left: var(--burst-x, 50%); top: var(--burst-y, 35%); }
.auth-emoji { position: absolute; pointer-events: none; font-size: 29px; }
.auth-emoji-one { right: -10px; top: 24px; rotate: 9deg; }
.auth-emoji-two { left: -12px; bottom: 42px; rotate: -12deg; }
.games-panel { margin-bottom: 28px; }
.game-welcome { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; padding: 30px 36px; border: 1px solid var(--line); border-radius: 25px; background: linear-gradient(135deg, var(--surface), var(--soft), var(--soft-two)); box-shadow: var(--depth); overflow: hidden; }
.game-welcome h2 { font-size: 2rem; margin-bottom: 8px; }
.game-welcome h2 > span { display: inline-block; font-size: .8em; }
.game-welcome p { color: var(--muted); margin-bottom: 18px; }
.game-welcome-art { position: relative; min-height: 220px; display: grid; place-items: center; perspective: 600px; }
.game-welcome-art > .sticker-art { width: 215px; height: 215px; rotate: -8deg; z-index: 1; }
.game-art-orbit { position: absolute; width: 270px; height: 270px; border: 1px solid color-mix(in srgb, var(--accent-two) 40%, transparent); border-radius: 50%; transform: rotateX(58deg) rotateZ(-16deg); }
.game-art-question { position: absolute; left: 10%; top: 18px; color: var(--accent); font-size: 65px; rotate: -17deg; }
.game-art-spark { position: absolute; right: 10%; bottom: 25px; font-size: 27px; }
.games-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 25px 0 12px; }
.games-heading h3 { font-size: 1.1rem; margin: 0; }
.games-heading .muted { font-size: 14px; }
.games-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 22px; }
.games-cards > .empty-state { grid-column: 1 / -1; padding: 25px 20px 35px; }
.games-cards > .empty-state > .sticker-art { width: 145px; height: 145px; }
.game-card { min-width: 0; padding: 23px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 23px; background: var(--surface); box-shadow: var(--depth); scroll-margin-top: 90px; }
.game-card.raneem { border-top-color: var(--accent-two); }
.game-card-heading { display: flex; align-items: start; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.game-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.game-person .avatar { width: 36px; height: 36px; }
.game-person > div { display: grid; min-width: 0; }
.game-person strong { font-size: 16px; }
.game-person time { color: var(--muted); font-size: 12px; }
.game-status { flex: none; padding: 4px 9px; border-radius: 9px; background: var(--soft); color: var(--accent-text); font-size: 12px; }
.game-revealed .game-status { background: var(--soft-two); color: var(--cyan-text); }
.game-hint { border-radius: 13px; padding: 12px 14px; background: var(--soft-two); margin-bottom: 10px; }
.game-hint > span { font-size: 13px; font-weight: 700; color: var(--cyan-text); }
.game-hint p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.game-card > .sticker-display { margin: 0 auto 10px; }
.game-card > .sticker-display .sticker-art { width: 120px; height: 120px; }
.game-secret { text-align: center; position: relative; margin: 18px 0; padding: 24px 18px 18px; border: 1px dashed var(--line); border-radius: 20px; background: linear-gradient(135deg, var(--soft), var(--surface-two)); overflow: hidden; }
.game-secret-face { display: inline-block; font-size: 57px; position: relative; z-index: 1; }
.game-secret-dot { position: absolute; right: 17%; top: 15px; font-size: 40px; color: var(--accent); opacity: .5; rotate: 15deg; }
.game-secret-lock { position: absolute; left: 19%; top: 56px; font-size: 24px; rotate: -12deg; }
.game-secret p { font-weight: 800; margin: 8px 0 0; }
.game-secret small { color: var(--muted); font-size: 13px; }
.game-private-answer { border: 1px dashed var(--line); border-radius: 13px; background: var(--surface-two); margin: 16px 0; }
.game-private-answer summary { min-height: 48px; padding: 12px 14px; color: var(--accent-text); font-size: 15px; cursor: pointer; }
.game-private-answer p { margin: 0; border-top: 1px solid var(--line); padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.game-answer { margin: 16px 0; border: 1px solid var(--line); border-radius: 16px; padding: 17px; background: linear-gradient(135deg, var(--soft-two), var(--surface-two)); }
.game-answer-label { color: var(--cyan-text); font-weight: 800; font-size: 15px; }
.game-answer p { margin: 8px 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.1rem; }
.game-answer time { color: var(--muted); font-size: 12px; }
.game-history { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 15px; }
.game-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; }
.game-history h4 { margin: 0; font-size: 16px; }
.game-history-heading > span { color: var(--muted); font-size: 13px; }
.game-history ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; max-height: 340px; overflow-y: auto; overscroll-behavior: contain; }
.guess-item { display: flex; align-items: start; gap: 11px; padding: 12px; background: var(--surface-two); border-radius: 12px; }
.guess-number { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; color: var(--accent-text); background: var(--soft); font-size: 14px; }
.guess-item > div { min-width: 0; }
.guess-item strong { font-size: 13px; }
.guess-item p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 3px 0 5px; font-size: 16px; }
.guess-item time { font-size: 12px; color: var(--muted); }
.game-no-guesses { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.game-owner-controls { display: grid; gap: 11px; margin-top: 18px; }
.game-owner-controls p { font-size: 14px; color: var(--muted); margin: 0; }
.game-owner-controls .button { justify-self: start; }
.guess-form { margin-top: 18px; }
.guess-form label { margin-top: 0; }
.guess-form textarea { min-height: 92px; font-size: max(16px, .95rem); }
.guess-emojis { display: flex; flex-wrap: wrap; gap: 3px; margin: 6px 0; }
.guess-submit-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.guess-submit-row .field-hint { flex: 1 1 130px; margin: 0; font-size: 13px; }
.guess-submit-row .button { font-size: 15px; }
.game-end { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-top: 17px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--cyan-text); font-size: 14px; }
.game-form-art { height: 125px; position: relative; display: flex; align-items: center; justify-content: center; gap: 25px; }
.game-form-art .sticker-art { width: 135px; height: 135px; }
.game-form-art > span:nth-child(2) { font-size: 27px; rotate: 12deg; }
.game-form-art > span:nth-child(3) { font-size: 26px; rotate: -12deg; }
#gamesPanel.hidden *, #auth.hidden * { animation-play-state: paused !important; }
:root[data-motion="full"] .game-welcome-art > .sticker-art, :root[data-motion="full"] .game-form-art > .sticker-art { animation: curious-sway 5s ease-in-out infinite; }
:root[data-motion="full"] .game-art-question, :root[data-motion="full"] .game-art-spark, :root[data-motion="full"] .auth-emoji, :root[data-motion="full"] .game-form-art > span:not(.sticker-art) { animation: emoji-float 4s ease-in-out infinite; }
:root[data-motion="full"] .auth-emoji-two, :root[data-motion="full"] .game-art-question { animation-delay: -.9s; }
:root[data-motion="full"] .game-secret-face, :root[data-motion="full"] .game-secret-lock { animation: curious-nod 4.5s ease-in-out infinite; }
:root[data-motion="full"] .sticker-display .playful-art { animation: curious-sway 6s ease-in-out infinite; }
:root[data-motion="full"] .game-card, :root[data-motion="full"] .entry-card, :root[data-motion="full"] .summary-card { animation: card-arrival .32s ease-out both; }
:root[data-motion="full"] .revealed-answer { animation: answer-unfold .5s cubic-bezier(.2,.8,.2,1) both; }
:root[data-motion="full"] .emoji-choice:hover, :root[data-motion="full"] .emoji-choice:focus-visible { animation: emoji-wave .45s ease-out; }
:root[data-motion="full"] .sticker-choice:hover .sticker-art { animation: emoji-wave .6s ease-out; }
:root[data-motion="full"] button:active:not(:disabled) { transform: scale(.97); }
@keyframes curious-sway { 25% { translate: 0 -6px; rotate: 3deg; } 75% { translate: 0 -3px; rotate: -3deg; } }
@keyframes emoji-float { 50% { translate: 0 -8px; rotate: 10deg; } }
@keyframes curious-nod { 25%, 75% { rotate: -7deg; } 50% { translate: 0 -4px; rotate: 5deg; } }
@keyframes card-arrival { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes answer-unfold { from { opacity: 0; transform: translateY(8px) rotateX(-12deg); } to { opacity: 1; transform: none; } }
@keyframes emoji-wave { 25% { rotate: 13deg; scale: 1.12; } 75% { rotate: -10deg; } }
@media (max-width: 900px) {
  .view-tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .view-tab { font-size: 11px; }
  .game-welcome { padding: 18px 16px; grid-template-columns: 1.3fr 1fr; border-radius: 20px; }
  .game-welcome h2 { font-size: 1.4rem; line-height: 1.5; }
  .game-welcome h2 > span { display: none; }
  .game-welcome p { font-size: 13px; margin-bottom: 12px; }
  .game-welcome .button { font-size: 13px; min-height: 44px; padding: 9px 12px; }
  .game-welcome-art { min-height: 160px; }
  .game-welcome-art > .sticker-art { width: 130px; height: 130px; }
  .game-art-orbit { width: 160px; height: 160px; }
  .game-art-question { font-size: 36px; top: 5px; left: 0; }
  .game-art-spark { font-size: 20px; bottom: 5px; right: 0; }
  .games-cards { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .game-card { padding: 18px; border-radius: 19px; }
  .game-private-answer summary { font-size: 14px; }
  .game-editor { width: 100%; }
  .game-editor .dialog-heading h2 { font-size: 1.3rem; }
  .game-editor .dialog-heading .eyebrow { max-width: 240px; }
  .auth-emoji { font-size: 23px; }.auth-emoji-one { top: 7px; }.auth-emoji-two { bottom: 35px; }
}
@media (max-width: 350px) {
  .view-tab { font-size: 10px; }
  .game-welcome { padding: 16px 12px; grid-template-columns: 1.3fr 1fr; }
  .game-welcome h2 { font-size: 1.2rem; }
  .game-welcome-art > .sticker-art { width: 112px; height: 112px; }
  .game-card { padding: 16px; }
  .game-form-art { gap: 13px; }
}
