.lobby-minigame-launch {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin: 24px 0 0; padding: 18px 23px; border: 1px solid #dfc8a4; border-radius: 13px;
  background: linear-gradient(110deg, #fff8e9, #f4ead9); color: #705237;
}
.lobby-minigame-launch > div { display: flex; align-items: center; gap: 17px; }
.lobby-minigame-launch > div > span { color: #b76a38; font-size: 32px; }
.lobby-minigame-launch strong { display: block; font: 700 18px var(--font-display, sans-serif); }
.lobby-minigame-launch p { margin: 4px 0 0; font-size: 12px; color: #8c7354; }
.lobby-minigame-launch button {
  flex-shrink: 0; padding: 11px 17px; border: 1px solid #bc8153; border-radius: 8px;
  background: #fffaf0; color: #9c4b25; font: 650 13px var(--font, sans-serif); transition: .2s ease;
}
.lobby-minigame-launch button:hover:not(:disabled) { background: #fff1d6; transform: translateY(-2px); box-shadow: 0 5px 12px #9d63331a; }
.minigame-dialog {
  width: min(850px, calc(100vw - 36px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0;
  overflow-x: hidden; overflow-y: auto; border: 1px solid #d9b890; border-radius: 23px;
  background: #fffbf2; color: #654b34; box-shadow: 0 30px 100px #392a3a4d, 0 5px 0 #e5cfac;
  font: 14px/1.5 var(--font, sans-serif); scrollbar-color: #c5aa83 #fbf5e8;
}
.minigame-dialog[open] { animation: minigame-enter .28s ease both; }
.minigame-dialog::backdrop { background: #3c342bb0; backdrop-filter: blur(7px); }
.minigame-dialog [hidden] { display: none !important; }
.minigame-dialog :is(button, input) { font: inherit; }
.minigame-dialog button:disabled { cursor: default; opacity: .55; }
.minigame-dialog :is(button, input):focus-visible { outline: 3px solid #bd7a43; outline-offset: 4px; }
.minigame-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 27px 32px 23px; border-bottom: 1px solid #e8d8bd; }
.minigame-eyebrow { margin: 0 0 7px; color: #ac7041; font-size: 9px; font-weight: 750; letter-spacing: 1.8px; }
.minigame-title { margin: 0; font: 750 clamp(28px, 4vw, 37px)/1.12 var(--font-display, sans-serif); letter-spacing: -1.2px; }
.minigame-description { margin: 9px 0 0; color: #8b755a; font-size: 13px; }
.minigame-close { display: grid; place-items: center; flex-shrink: 0; width: 35px; height: 35px; padding: 0; border: 1px solid #ddc5a2; border-radius: 50%; background: #faf0e0; color: #9b6239; transition: .18s ease; }
.minigame-close-icon { position: relative; display: block; width: 14px; height: 14px; pointer-events: none; }
.minigame-close-icon::before, .minigame-close-icon::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 1.5px; border-radius: 1px; background: currentColor; transform: translate(-50%, -50%) rotate(45deg); }
.minigame-close-icon::after { transform: translate(-50%, -50%) rotate(-45deg); }
.minigame-close:hover { transform: rotate(8deg); background: #f0dfc4; }
.minigame-search-notice { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 13px 30px; background: #edf2e4; border-bottom: 1px solid #ced8bb; color: #5d754b; font-size: 12px; }
.minigame-link { padding: 5px 0; border: 0; background: transparent; color: #a4542c; font-weight: 700 !important; text-underline-offset: 4px; }
.minigame-link:hover { text-decoration: underline; }
.minigame-stage { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 218px; padding: 35px 110px 25px; overflow: hidden; background: radial-gradient(ellipse at center, #fff5dc, #fffbf2 73%); }
.minigame-round { position: absolute; top: 18px; left: 30px; border: 1px solid #e7d6b8; border-radius: 20px; padding: 4px 10px; color: #937d5e; font-size: 10px; }
.minigame-phase { margin: 14px 0 7px; color: #a06a3c; font-size: 9px; font-weight: 750; letter-spacing: 2.5px; }
.minigame-prompt { margin: 0; text-align: center; overflow-wrap: anywhere; font: 750 clamp(32px, 5vw, 49px)/1.16 var(--font-display, sans-serif); letter-spacing: -.8px; color: #9e502b; }
.minigame-timer { --minigame-remaining: 100%; position: absolute; top: 22px; right: 27px; width: 77px; height: 77px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; isolation: isolate; background: conic-gradient(#c47b46 var(--minigame-remaining), #eadcc5 0); }
.minigame-timer::before { content: ""; position: absolute; inset: 5px; z-index: -1; border-radius: 50%; background: #fffbf2; }
.minigame-timer strong { font: 750 27px/1.1 var(--font-display, sans-serif); color: #aa5c31; font-variant-numeric: tabular-nums; }
.minigame-timer > span { font-size: 8px; color: #917555; }
.minigame-ornaments { position: absolute; inset: 0; pointer-events: none; }
.minigame-spark { position: absolute; color: #d8b275; font-size: 33px; animation: minigame-spark 4s ease-in-out infinite; }
.minigame-spark:first-child { top: 88px; left: 14%; }
.minigame-spark:last-child { right: 17%; bottom: 33px; font-size: 22px; animation-delay: -2s; }
.minigame-fox { position: relative; width: 55px; height: 49px; margin-top: 3px; animation: minigame-fox 4s ease-in-out infinite; }
.minigame-fox i { position: absolute; inset: 0; display: block; clip-path: polygon(0 0, 24% 24%, 74% 24%, 100% 0, 94% 73%, 70% 95%, 50% 100%, 29% 94%, 8% 72%); background: #ce783f; }
.minigame-fox b { position: absolute; left: 5px; right: 5px; bottom: 1px; height: 26px; background: #ffefd0; clip-path: polygon(0 0, 50% 43%, 100% 0, 90% 75%, 50% 100%, 10% 75%); }
.minigame-fox span { position: absolute; bottom: 0; left: 0; width: 100%; text-align: center; color: #70472d; font-size: 23px; line-height: 1; }
.minigame-answer-form { padding: 6px 32px 27px; }
.minigame-answer-label { display: block; margin-bottom: 9px; color: #7a5c3b; font-weight: 700; font-size: 13px; }
.minigame-answer-entry { display: flex; gap: 10px; }
.minigame-answer-input { flex: 1; width: 100%; min-width: 0; min-height: 51px; border: 1px solid #cdb28d; border-radius: 10px; padding: 12px 15px; background: #fffef9; color: #694a30; font-size: 17px !important; }
.minigame-answer-input::placeholder { color: #a59175; font-size: 14px; }
.minigame-answer-input:disabled { background: #f5eee2; color: #8a795f; }
.minigame-answer-input[aria-invalid="true"] { border-color: #b75e40; }
.minigame-primary { padding: 12px 20px; border: 1px solid #aa532b; border-radius: 10px; background: #bb6134; color: #fff8eb; font-weight: 700 !important; white-space: nowrap; box-shadow: 0 3px 0 #9750241c; transition: .18s ease; }
.minigame-primary:hover:not(:disabled) { background: #a8512b; transform: translateY(-2px); }
.minigame-answer-hint { margin: 10px 0 0; color: #8c785f; font-size: 11px; overflow-wrap: anywhere; }
.minigame-input-error { margin: 9px 0 0; color: #a44931; font-size: 12px; }
.minigame-results { padding: 0 30px 27px; }
.minigame-results > h3 { margin: 0 0 14px; color: #75583d; font-size: 16px; }
.minigame-result-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.minigame-result-card { min-width: 0; padding: 17px; border: 1px solid #dfcfb5; border-radius: 13px; background: #fffdf7; animation: minigame-card .35s ease backwards; animation-delay: calc(var(--minigame-card-index, 0) * 65ms); transition: transform .18s, box-shadow .18s, border-color .18s; }
.minigame-result-card:hover { transform: translateY(-3px); box-shadow: 0 7px 20px #9d68301a; border-color: #c59c6b; }
.minigame-result-card[data-match="true"] { background: #f4f5e9; border-color: #c0cba5; }
.minigame-result-heading { display: flex; flex-wrap: wrap; gap: 7px 12px; align-items: center; margin-bottom: 13px; }
.minigame-result-heading h4 { min-width: 0; margin: 0; color: #93522e; font: 750 21px/1.2 var(--font-display, sans-serif); overflow-wrap: anywhere; }
.minigame-match-badge { display: inline-block; width: fit-content; padding: 3px 8px; border-radius: 12px; background: #eee5d7; color: #8d7758; font-size: 9px; white-space: nowrap; }
.minigame-result-card[data-match="true"] .minigame-match-badge { background: #e2e9d2; color: #637948; }
.minigame-people { display: flex; flex-wrap: wrap; gap: 11px 15px; list-style: none; margin: 0; padding: 0; }
.minigame-people li { display: flex; min-width: 0; max-width: 100%; align-items: center; gap: 9px; }
.minigame-avatar { position: relative; display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border: 1px solid #d8c3a3; border-radius: 11px; background: #f0e2c9; color: #a06b3d; font-weight: 700; overflow: hidden; }
.minigame-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.minigame-person-copy { min-width: 0; }
.minigame-person-copy strong, .minigame-person-copy small { display: block; overflow-wrap: anywhere; }
.minigame-person-copy strong { color: #725b41; font-size: 11px; font-weight: 650; }
.minigame-person-copy small { color: #91816a; font-size: 10px; }
.minigame-empty { grid-column: 1 / -1; padding: 18px; border: 1px solid #e3d3b8; border-radius: 10px; color: #8e785a; }
.minigame-footer { padding: 18px 32px 20px; border-top: 1px solid #e6d7bc; background: #f7f0e2; }
.minigame-footer-labels { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; color: #81694b; font-size: 11px; }
.minigame-next { color: #a2683d; }
.minigame-progress { height: 5px; border-radius: 4px; background: #e5d8c1; margin: 10px 0 12px; overflow: hidden; }
.minigame-progress > span { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #dcb27b, #ba6436); transition: width .1s linear; }
.minigame-footer-copy { color: #9a8669; font-size: 10px; text-align: center; }
.minigame-connection { margin: 0 30px 20px; padding: 14px 16px; border: 1px solid #d7ba91; border-radius: 10px; background: #f9edda; color: #936239; font-size: 12px; }
.minigame-connection button { margin-top: 7px; }
.minigame-dialog[data-phase="results"] .minigame-stage { min-height: 185px; padding-top: 25px; padding-bottom: 24px; }
.minigame-dialog[data-phase="results"] .minigame-prompt { font-size: clamp(29px, 4vw, 40px); }
.minigame-dialog[data-phase="results"] .minigame-fox { transform: scale(.8); margin-bottom: -8px; }
.minigame-dialog[data-phase="results"] .minigame-progress > span { background: linear-gradient(90deg, #bec69f, #7d9363); }
.minigame-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.minigame-motion-paused *, .minigame-motion-paused *::before, .minigame-motion-paused *::after { animation-play-state: paused !important; transition: none !important; }
@keyframes minigame-enter { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes minigame-card { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes minigame-spark { 0%, 100% { opacity: .45; transform: scale(.8) rotate(-8deg); } 50% { opacity: 1; transform: scale(1.1) rotate(8deg); } }
@keyframes minigame-fox { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }
@media (max-width: 600px) {
  .lobby-minigame-launch { flex-wrap: wrap; padding: 15px 17px; gap: 12px; }
  .lobby-minigame-launch button { width: 100%; }
  .minigame-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 17px; }
  .minigame-header { padding: 22px 20px 18px; }
  .minigame-eyebrow { font-size: 8px; letter-spacing: 1.2px; }
  .minigame-description { font-size: 12px; }
  .minigame-stage { min-height: 220px; padding: 69px 22px 24px; }
  .minigame-timer { width: 62px; height: 62px; right: 18px; top: 13px; }
  .minigame-timer strong { font-size: 22px; }
  .minigame-round { left: 20px; top: 20px; }
  .minigame-answer-form { padding: 5px 20px 21px; }
  .minigame-answer-entry { flex-direction: column; }
  .minigame-primary { min-height: 45px; }
  .minigame-results { padding: 0 18px 22px; }
  .minigame-result-groups { grid-template-columns: 1fr; }
  .minigame-footer { padding: 16px 20px; }
  .minigame-connection { margin-right: 20px; margin-left: 20px; }
  .minigame-search-notice { padding: 12px 20px; }
  .minigame-dialog[data-phase="results"] .minigame-stage { padding-top: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .minigame-dialog, .minigame-dialog *, .lobby-minigame-launch button { animation: none !important; transition: none !important; }
}
