/* Game Lab: Rainbow Rescue (a kinder hangman). Same family and themes as the memory game. */
@font-face { font-family: 'DX Letters'; src: url('../../assets/fonts/dx-letters-bold.woff2') format('woff2'); font-weight: 700; font-display: block; }
.lh { --outline: #26324a; --bar: rgba(255,255,255,.8); --txt: #1c2b3d; --panel: rgba(255,255,255,.9);
	position: relative; overflow: hidden; border-radius: 26px; max-width: 1000px; margin: 0 auto; padding: 0 0 72px; isolation: isolate;
	font-family: var(--dx-font-heading, 'Lexend', system-ui, sans-serif); color: var(--txt); box-shadow: 0 10px 30px rgba(28,43,61,.18); }
.lh--night { --bar: rgba(20,26,50,.6); --txt: #fff; --panel: rgba(255,255,255,.12); }
.lh:fullscreen { max-width: none; border-radius: 0; overflow: auto; }
.lh-scene { position: absolute; inset: 0; z-index: -1; } .lh-scene svg { width: 100%; height: 100%; display: block; }
.lh-scene::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.28); } .lh--night .lh-scene::after { background: rgba(0,0,0,.05); }
.lh-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; padding: .7rem 1rem; margin: .75rem; border-radius: 18px; background: var(--bar); backdrop-filter: blur(4px); }
.lh-timer { font-size: clamp(1.4rem, 1rem + 1.5vw, 2rem); font-weight: 800; font-variant-numeric: tabular-nums; min-width: 3.2em; }
.lh-status { text-align: center; font-size: clamp(1rem, .8rem + 1vw, 1.45rem); font-weight: 800; }
.lh-status--warn { color: #c23b3b; } .lh--night .lh-status--warn { color: #ffb4a8; } .lh-status--good { color: #1f7a4a; } .lh--night .lh-status--good { color: #9ff0c4; }
.lh-count { font-size: clamp(1rem, .9rem + .8vw, 1.4rem); font-weight: 800; color: #1f7a4a; background: #e7f6ee; padding: .15rem .7rem; border-radius: 999px; white-space: nowrap; }
.lh-board { margin: 0 clamp(.6rem, 3vw, 2rem); padding: .8rem clamp(.6rem, 2vw, 1.4rem) 1rem; border-radius: 24px; background: var(--panel); backdrop-filter: blur(3px); box-shadow: 0 6px 20px rgba(28,43,61,.08); text-align: center; }
/* the rainbow */
.lh-sky { position: relative; max-width: 380px; margin: 0 auto; }
.lh-rainbow { width: 100%; height: auto; display: block; overflow: visible; }
.lh-stripe { transition: opacity .6s ease, stroke .6s ease, filter .6s ease; }
.lh-stripe.is-faded { opacity: .13; filter: saturate(0); }
.lh-sparkles, .lh-rain { opacity: 0; }
.lh-sky.is-saved .lh-sparkles { animation: lh-twinkle 1.4s ease; }
.lh-sky.is-saved .lh-stripe:not(.is-faded) { animation: lh-glow 1.2s ease; }
.lh-sky.is-rain .lh-rain { opacity: 1; animation: lh-rain .6s linear infinite; }
.lh-left { margin: .1rem 0 0; font-size: .95rem; font-weight: 700; color: #566273; } .lh--night .lh-left { color: #dfe6f3; }
.lh-hint { display: inline-block; margin: .5rem 0 .4rem; padding: .2rem .8rem; border-radius: 999px; background: #fff4d6; color: #8a5a10; font-size: .95rem; font-weight: 700; }
/* the word */
.lh-word { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(5px, 1vw, 10px); margin: .5rem 0 1rem; min-height: 64px; }
.lh-slot { width: clamp(34px, 5.5vw, 54px); height: clamp(48px, 7vw, 64px); display: grid; place-items: center; font-family: 'DX Letters', 'Andika', sans-serif; font-weight: 700; font-size: clamp(1.6rem, 1.1rem + 2vw, 2.5rem); color: #1c2b3d;
	border-radius: 12px; background: #fffaf0; border: 2px solid #e3d9c4; border-bottom: 5px solid #9fb4c9; }
.lh--night .lh-slot { background: rgba(255,255,255,.92); }
.lh-slot.is-shown { border-bottom-color: #2fa36b; animation: lh-pop .3s cubic-bezier(.34,1.56,.64,1); }
.lh-slot.is-revealed { color: #c23b3b; border-bottom-color: #c23b3b; }
.lh-slot--fixed { background: none; border-color: transparent; }
/* the keyboard (alphabet order) */
.lh-keys { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: clamp(4px, .8vw, 8px); max-width: 760px; margin: 0 auto; }
.lh-key { font-family: 'DX Letters', 'Andika', sans-serif; font-weight: 700; font-size: clamp(1.05rem, .8rem + 1vw, 1.5rem); color: #fff; min-height: clamp(42px, 5.5vw, 52px); border-radius: 12px; border: 0;
	background: linear-gradient(180deg, #3aa6a0, #1b7f7a); box-shadow: 0 4px 0 #14625e; cursor: pointer; text-shadow: 0 1px 1px rgba(0,0,0,.2); transition: transform .1s, opacity .25s; }
.lh-key--v { background: linear-gradient(180deg, #e3a02a, #c98314); box-shadow: 0 4px 0 #9a630d; }
.lh-key:hover:not(:disabled) { transform: translateY(-2px); }
.lh-key:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #14625e; }
.lh-key:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px #17706f; }
.lh-key.is-right { background: linear-gradient(180deg, #4fc58a, #2a9a61); box-shadow: 0 4px 0 #1f7a4a; cursor: default; }
.lh-key.is-wrong { background: #cfd6de; box-shadow: 0 4px 0 #aab4bf; color: #8a94a3; text-shadow: none; cursor: default; }
.lh-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; } .lh-spacer { flex: 1; }
.lh-ctl { width: 48px; height: 48px; border-radius: 14px; border: 3px solid var(--outline); background: rgba(255,255,255,.92); font-size: 1.35rem; cursor: pointer; box-shadow: 0 3px 0 var(--outline); }
.lh-ctl:active, .lh-btn:active { transform: translateY(2px); }
.lh-ctl:focus-visible, .lh-btn:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px #17706f; }
.lh-overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(28,43,61,.3); backdrop-filter: blur(2px); padding: 1rem; overflow: auto; } .lh-overlay[hidden] { display: none; }
.lh-card { background: #fff; color: #1c2b3d; border: 4px solid #26324a; border-radius: 26px; box-shadow: 0 8px 0 #26324a, 0 18px 40px rgba(0,0,0,.25); padding: 1.4rem 1.8rem; text-align: center; max-width: 440px; width: 100%; animation: lh-pop .45s cubic-bezier(.34,1.56,.64,1); }
.lh-card__kicker { margin: 0; font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #c0475a; }
.lh-card__title { margin: .3rem 0 .4rem; font-size: 1.5rem; } .lh-card__text { margin: 0 0 1rem; color: #3b4a5c; font-family: var(--dx-font-body, inherit); }
.lh-stars { margin: .2rem 0 0; font-size: 2.2rem; color: #f2b01e; letter-spacing: .1em; }
.lh-time { font-size: 2.2rem; font-weight: 800; margin: 0 0 .5rem; font-variant-numeric: tabular-nums; }
.lh-btn { font: inherit; font-weight: 800; font-size: 1.25rem; margin-top: 1rem; padding: .7rem 2.4rem; border-radius: 999px; border: 3px solid #26324a; background: #2fa36b; color: #fff; cursor: pointer; box-shadow: 0 5px 0 #1f6f48; }
.lh-btn--small { font-size: 1rem; margin: 0; padding: .45rem 1.2rem; }
.lh-initials label { display: block; font-weight: 700; margin-bottom: .35rem; } .lh-initials > div { display: flex; gap: .5rem; justify-content: center; }
.lh-initials input { font: inherit; font-weight: 800; font-size: 1.3rem; width: 5.5em; text-align: center; text-transform: uppercase; letter-spacing: .15em; padding: .35rem .5rem; border: 3px solid #26324a; border-radius: 12px; }
.lh-initials__note { margin: .4rem 0 0; font-size: .85rem; color: #566273; font-family: var(--dx-font-body, inherit); }
.lh-lboard__title { margin: 1rem 0 .3rem; font-weight: 800; }
.lh-lboard { list-style: none; counter-reset: r; margin: 0 auto; padding: 0; max-width: 280px; text-align: left; }
.lh-lboard li { counter-increment: r; display: flex; gap: .6rem; padding: .25rem .6rem; border-radius: 10px; font-variant-numeric: tabular-nums; }
.lh-lboard li::before { content: counter(r) "."; width: 1.6em; color: #566273; font-weight: 700; } .lh-lboard li.is-me { background: #fff4d6; font-weight: 800; }
.lh-lboard__who { flex: 1; font-weight: 800; letter-spacing: .1em; } .lh-lboard__score { min-width: 3em; text-align: right; font-weight: 800; color: #1f7a4a; }
.lh-confetti { position: absolute; top: 0; z-index: 6; border-radius: 2px; pointer-events: none; }
@keyframes lh-pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
@keyframes lh-twinkle { 0%, 100% { opacity: 0; } 30%, 70% { opacity: 1; } }
@keyframes lh-glow { 50% { filter: brightness(1.15) drop-shadow(0 0 6px #fff); } }
@keyframes lh-rain { from { transform: translateY(-6px); } to { transform: translateY(10px); } }
@media (max-width: 640px) { .lh-keys { grid-template-columns: repeat(7, minmax(0, 1fr)); } .lh-top { margin: .6rem .5rem; padding: .5rem .7rem; } .lh-board { margin: 0 .4rem; padding: .6rem .5rem .8rem; } .lh-sky { max-width: 260px; } .lh-slot { width: 30px; height: 44px; font-size: 1.5rem; border-radius: 9px; } .lh-word { gap: 4px; } }
@media (prefers-reduced-motion: reduce) { .lh *, .lh { animation: none !important; transition: none !important; } }
.lh-word { flex-wrap: nowrap; }
.lh-word--long .lh-slot { width: clamp(28px, 4.6vw, 48px); }
.lh-word--xlong .lh-slot { width: clamp(22px, 4vw, 44px); font-size: clamp(1.2rem, .9rem + 1.6vw, 2.2rem); }
@media (max-width: 640px) { .lh-word--long .lh-slot { width: 26px; height: 40px; font-size: 1.3rem; } .lh-word--xlong .lh-slot { width: 21px; height: 36px; font-size: 1.1rem; border-radius: 7px; } .lh-word--xlong { gap: 3px; } }
