#emoji-challenge-modal { width: min(540px, calc(100% - 2rem)); text-align: center; overflow-x: hidden; }
#emoji-challenge-modal h2 { margin: 0 1rem 1.5rem; font-size: clamp(1rem, 4vw, 1.3rem); }
#emoji-clue { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; min-height: 105px; margin: 1rem 0 1.7rem; font: clamp(2.3rem, 8vw, 3.6rem)/1.6 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
#emoji-clue[hidden] { display: none; }
.emoji-flag { display: inline-block; width: 1.3em; height: .87em; object-fit: contain; margin: 0 .08em; flex: 0 0 auto; }
.emoji-graphic { display: inline-block; width: 1.4em; height: 1.4em; object-fit: contain; margin: 0 .08em; flex: 0 0 auto; }
#emoji-answer-form { position: relative; }
#emoji-answer { display: block; width: 100%; min-height: 48px; padding: .7rem .9rem; border: 1px solid #af8544; border-radius: .35rem; background: #17120e; color: #f4d994; font: 16px/1.4 Arial, sans-serif; text-align: center; }
#emoji-answer::placeholder { color: #c8a76c; opacity: .9; }
#emoji-answer:focus-visible { outline: 2px solid #ffe18b; outline-offset: 3px; }
#emoji-answer[readonly] { border-color: #79b27e; }
#emoji-solved-answer { margin: 1.3rem 0 2rem; color: #edbd55; font-size: 1.15rem; font-weight: bold; text-align: center; }
#emoji-navigation { display: flex; justify-content: space-between; min-height: 36px; margin: .5rem -.6rem -.8rem; }
#emoji-navigation[hidden] { display: none; }
#emoji-navigation button { min-width: 52px; height: 36px; padding: 0; border: 0; background: transparent; color: #c8a76c; font: 32px/1 Arial, sans-serif; cursor: pointer; }
#emoji-navigation .emoji-position { font: .75rem/1 Arial, sans-serif; vertical-align: middle; }
#emoji-navigation button:hover { color: #ffe18b; }
#emoji-forward { margin-left: auto; }
#emoji-challenge-modal .emoji-controls { display: flex; justify-content: center; flex-wrap: wrap; gap: .8rem; margin-top: 1.25rem; }
#emoji-challenge-modal .emoji-controls button { min-height: 44px; min-width: 95px; padding: .55rem 1rem; border: 1px solid #af8544; border-radius: .3rem; background: #3d2e1e; color: #edbd55; font: bold .85rem/1.4 Arial, sans-serif; letter-spacing: .08em; cursor: pointer; }
#emoji-challenge-modal .emoji-controls button:hover { background: #4a3824; color: #ffe18b; }
#emoji-result { display: flex; align-items: center; justify-content: center; height: 3.3em; line-height: 1.65; margin: .8rem 0 0; color: #a2d7a1; font-weight: bold; }
#emoji-result[data-outcome="incorrect"] { color: #e68177; }
#emoji-counter { margin: 1.4rem 0 0; color: #c8a76c; font-size: .9rem; }
#emoji-completion h3 { color: #edbd55; font-size: 1.1rem; letter-spacing: .06em; }
#emoji-completion p { font-style: italic; }
#emoji-completion #emoji-final-feedback { color: #a2d7a1; font-style: normal; font-weight: bold; }
#emoji-challenge-modal.emoji-win #emoji-final-feedback { text-shadow: 0 0 12px #75bc6d88; }
#emoji-real-puzzle { color: #e68177; text-align: center; font-weight: bold; margin: .75rem 0 0; }
.emoji-error #emoji-answer { animation: emoji-error-flash 350ms ease-out; }
.emoji-success #emoji-answer { animation: emoji-success-glow 900ms ease-out; }
#emoji-sparkles { position: absolute; inset: 0; pointer-events: none; }
#emoji-sparkles span { position: absolute; left: 50%; top: 1.5rem; color: #91cf8c; font-size: .9rem; opacity: 0; animation: emoji-sparkle 850ms ease-out both; }
#emoji-sparkles span:nth-child(even) { color: #edbd55; }
@keyframes emoji-error-flash { 0%, 35% { border-color: #d8736a; box-shadow: 0 0 12px #c33d394d; } 100% { border-color: #af8544; box-shadow: none; } }
@keyframes emoji-success-glow { 0%, 30% { border-color: #91cf8c; box-shadow: 0 0 18px #75bc6d66; } 100% { border-color: #79b27e; box-shadow: none; } }
@keyframes emoji-sparkle { 0% { opacity: 0; transform: translate(0,0); } 20% { opacity: .9; } 100% { opacity: 0; transform: translate(var(--x),var(--y)) rotate(var(--turn)); } }
@media(prefers-reduced-motion:reduce) {
  .emoji-error #emoji-answer, .emoji-success #emoji-answer { animation: none; }
  .emoji-error #emoji-answer { border-color: #d8736a; box-shadow: 0 0 6px #c33d3933; }
  .emoji-success #emoji-answer { border-color: #91cf8c; box-shadow: 0 0 8px #75bc6d44; }
  #emoji-sparkles { display: none; }
}
