/* Game Lab: Word Builder. Same family and themes as the memory game; tile colors match the Alphabet Arch. */
@font-face { font-family: 'DX Letters'; src: url('../../assets/fonts/dx-letters-bold.woff2') format('woff2'); font-weight: 700; font-display: block; }
.lb { --outline: #26324a; --bar: rgba(255,255,255,.8); --txt: #1c2b3d; --panel: rgba(255,255,255,.88);
	position: relative; overflow: hidden; border-radius: 26px; max-width: 1000px; margin: 0 auto; min-height: 520px; 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); }
.lb--night { --bar: rgba(20,26,50,.6); --txt: #fff; --panel: rgba(255,255,255,.14); }
.lb:fullscreen { max-width: none; border-radius: 0; }
.lb-scene { position: absolute; inset: 0; z-index: -1; } .lb-scene svg { width: 100%; height: 100%; display: block; }
.lb-scene::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.28); } .lb--night .lb-scene::after { background: rgba(0,0,0,.05); }
.lb-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); }
.lb-timer { font-size: clamp(1.4rem, 1rem + 1.5vw, 2rem); font-weight: 800; font-variant-numeric: tabular-nums; min-width: 3.2em; }
.lb-status { text-align: center; font-size: clamp(1rem, .8rem + 1.1vw, 1.55rem); font-weight: 800; }
.lb-status--warn { color: #c23b3b; } .lb--night .lb-status--warn { color: #ffb4a8; } .lb-status--good { color: #1f7a4a; } .lb--night .lb-status--good { color: #9ff0c4; }
.lb-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; }
.lb-board { margin: .4rem clamp(.8rem, 4vw, 3rem) 0; padding: clamp(1rem, 3vw, 2rem) 1rem 1rem; border-radius: 22px; background: var(--panel); border: 3px solid var(--outline); box-shadow: 0 6px 0 var(--outline); }
.lb-slots { display: flex; justify-content: center; gap: clamp(6px, 1.2vw, 12px); flex-wrap: nowrap; min-height: 84px; }
.lb-slot { flex: 0 1 clamp(58px, 11vw, 104px); min-width: 0; height: clamp(62px, 9vw, 84px); border-radius: 16px; border: 3px dashed #9fb4c9; background: rgba(175,205,239,.18); display: grid; place-items: stretch; transition: background .15s; }
.lb-slot.is-over { background: rgba(242,176,30,.25); border-color: #f2b01e; }
.lb-slot > .lb-tile { width: 100%; height: 100%; margin: 0; }
.lb-built { min-height: 1.5em; margin: .8rem 0 0; text-align: center; font-family: 'DX Letters', 'Andika', sans-serif; font-weight: 700; font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.8rem); color: #1f7a4a; }
.lb--night .lb-built { color: #9ff0c4; }
.lb-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 1.4vw, 14px); min-height: 84px; margin-top: .6rem; }
.lb-tile { font-family: 'DX Letters', 'Andika', sans-serif; font-weight: 700; font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); line-height: 1; color: #fff; min-width: clamp(58px, 9vw, 84px); height: clamp(62px, 9vw, 84px); padding: 0 .35em;
	border-radius: 16px; border: 3px solid var(--outline); box-shadow: 0 5px 0 var(--outline), 0 8px 14px rgba(0,0,0,.14); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; text-shadow: 0 1px 1px rgba(0,0,0,.25); transition: transform .12s ease; }
.lb-tile--c { background: linear-gradient(180deg, #3aa6a0, #1b7f7a); }
.lb-tile--v { background: linear-gradient(180deg, #e3a02a, #c98314); }
.lb-tile:hover { transform: translateY(-3px); }
.lb-tile:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px #17706f, 0 5px 0 var(--outline); }
.lb-tile.is-dragging { position: fixed; z-index: 99999; cursor: grabbing; transform: rotate(-3deg) scale(1.08); pointer-events: none; box-shadow: 0 10px 0 var(--outline), 0 18px 30px rgba(0,0,0,.25); }
.lb-tile.is-locked { background: linear-gradient(180deg, #4fc58a, #2a9a61); border-color: #1f7a4a; box-shadow: 0 5px 0 #1f7a4a; cursor: default; }
.lb-tile.is-wrong { background: linear-gradient(180deg, #ef7b73, #d64545); border-color: #a52f2f; box-shadow: 0 5px 0 #a52f2f; animation: lb-wiggle .5s ease; }
.lb-slots.is-joined { gap: 0; }
.lb-slots.is-joined .lb-slot { border: 0; background: none; }
.lb-slots.is-joined .lb-slot > .lb-tile { border-radius: 0; }
.lb-slots.is-joined .lb-slot:first-child > .lb-tile { border-radius: 16px 0 0 16px; } .lb-slots.is-joined .lb-slot:last-child > .lb-tile { border-radius: 0 16px 16px 0; }
.lb-help { text-align: center; margin: 1rem 0 0; font-size: .92rem; color: #566273; font-family: var(--dx-font-body, inherit); } .lb--night .lb-help { color: #dfe6f3; }
.lb-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; } .lb-spacer { flex: 1; }
.lb-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); }
.lb-ctl:active, .lb-btn:active { transform: translateY(2px); }
.lb-ctl:focus-visible, .lb-btn:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px #17706f; }
.lb-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; } .lb-overlay[hidden] { display: none; }
.lb-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: lb-pop .45s cubic-bezier(.34,1.56,.64,1); }
.lb-card__kicker { margin: 0; font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #c0475a; }
.lb-card__title { margin: .3rem 0 .4rem; font-size: 1.6rem; } .lb-card__text { margin: 0 0 1rem; color: #3b4a5c; font-family: var(--dx-font-body, inherit); }
.lb-time { font-size: 2.8rem; font-weight: 800; margin: 0 0 .5rem; font-variant-numeric: tabular-nums; }
.lb-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; }
.lb-btn--small { font-size: 1rem; margin: 0; padding: .45rem 1.2rem; }
.lb-initials label { display: block; font-weight: 700; margin-bottom: .35rem; } .lb-initials > div { display: flex; gap: .5rem; justify-content: center; }
.lb-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; }
.lb-initials__note { margin: .4rem 0 0; font-size: .85rem; color: #566273; font-family: var(--dx-font-body, inherit); }
.lb-lboard__title { margin: 1rem 0 .3rem; font-weight: 800; }
.lb-lboard { list-style: none; counter-reset: r; margin: 0 auto; padding: 0; max-width: 260px; text-align: left; }
.lb-lboard li { counter-increment: r; display: flex; gap: .6rem; padding: .25rem .6rem; border-radius: 10px; font-variant-numeric: tabular-nums; }
.lb-lboard li::before { content: counter(r) "."; width: 1.6em; color: #566273; font-weight: 700; } .lb-lboard li.is-me { background: #fff4d6; font-weight: 800; }
.lb-lboard__who { flex: 1; font-weight: 800; letter-spacing: .1em; }
.lb-confetti { position: absolute; top: 0; z-index: 6; border-radius: 2px; pointer-events: none; }
@keyframes lb-pop { 0% { transform: scale(.85); } 100% { transform: scale(1); } }
@keyframes lb-wiggle { 20% { transform: rotate(-6deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(2deg); } }
@media (max-width: 640px) { .lb-top { margin: .6rem .5rem; padding: .5rem .7rem; } .lb-board { margin: .4rem .5rem 0; padding: .9rem .5rem .8rem; } .lb-slot { flex-basis: 44px; height: 56px; border-radius: 12px; } .lb-tile { min-width: 44px; height: 56px; font-size: 1.45rem; border-radius: 12px; padding: 0 .2em; } .lb-slots { gap: 4px; } }
@media (prefers-reduced-motion: reduce) { .lb *, .lb { animation: none !important; transition: none !important; } }
