html.ll-wordset-game-run-modal-open,
body.ll-wordset-game-run-modal-open {
    overflow: hidden;
}

body.ll-tools-wordset-game-guard-active .ll-wordset-game-run-modal,
body.ll-tools-wordset-game-guard-active .ll-wordset-game-run-modal *,
body.ll-tools-wordset-game-guard-active .ll-wordset-game-stage,
body.ll-tools-wordset-game-guard-active .ll-wordset-game-stage * {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body.ll-tools-wordset-game-guard-active .ll-wordset-game-run-modal,
body.ll-tools-wordset-game-guard-active .ll-wordset-game-run-modal__dialog,
body.ll-tools-wordset-game-guard-active .ll-wordset-game-stage,
body.ll-tools-wordset-game-guard-active .ll-wordset-game-stage__canvas-wrap {
    overscroll-behavior: contain;
}

.ll-wordset-game-run-modal {
    --ll-wordset-game-run-pad: clamp(10px, 1.8vw, 20px);
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: var(--ll-wordset-game-run-pad);
}

.ll-wordset-game-run-modal[hidden] {
    display: none !important;
}

.ll-wordset-game-run-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
}

.ll-wordset-game-run-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 1480px);
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    display: grid;
    align-items: stretch;
    justify-items: center;
    padding: 0;
}

.ll-wordset-game-run-modal__dialog .ll-wordset-game-stage {
    width: min(100%, 94vw);
    max-width: 100%;
    height: min(100%, calc(100dvh - (var(--ll-wordset-game-run-pad) * 2)));
    max-height: calc(100dvh - (var(--ll-wordset-game-run-pad) * 2));
    margin: 0 auto;
}

.ll-wordset-game-run-modal__dialog .ll-wordset-game-stage[data-ll-wordset-active-game="speaking-practice"] {
    width: min(100%, 1080px);
    max-width: min(100%, 1080px);
}

.ll-wordset-game-run-modal__dialog .ll-wordset-game-stage[data-ll-wordset-active-game="line-up"] {
    width: min(100%, 1360px);
    max-width: min(100%, 1360px);
}

.ll-wordset-game-run-modal__dialog .ll-wordset-game-stage[data-ll-wordset-active-game="unscramble"] {
    width: min(100%, 1360px);
    max-width: min(100%, 1360px);
}

.ll-wordset-games-page {
    --ll-games-ink: #0f172a;
    --ll-games-accent: #12233d;
    --ll-games-accent-hover: #0f172a;
    --ll-games-accent-strong: #171c2e;
    --ll-games-accent-soft: #f2f6fc;
    --ll-games-accent-soft-strong: #dde8f7;
    --ll-games-accent-border: rgba(18, 35, 61, 0.34);
    --ll-games-accent-border-strong: rgba(15, 23, 42, 0.42);
    --ll-games-accent-shadow: rgba(18, 35, 61, 0.24);
    --ll-games-accent-shadow-soft: rgba(18, 35, 61, 0.22);
    --ll-games-panel: #ffffff;
    --ll-games-line: rgba(15, 23, 42, 0.12);
    --ll-games-shadow: 0 24px 54px rgba(15, 23, 42, 0.12);
    --ll-games-canvas-bg: radial-gradient(circle at top, rgba(103, 232, 249, 0.18), transparent 34%), linear-gradient(180deg, #0f172a 0%, #12233d 46%, #171c2e 100%);
    width: 100%;
    max-width: var(--ll-wp-main-shell-max-width, 1100px);
    margin-inline: auto;
}

.ll-wordset-games-page [hidden] {
    display: none !important;
}

.ll-wordset-games-catalog {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
    margin-bottom: 24px;
}

.ll-wordset-games-length {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin: 0 0 20px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid var(--ll-games-line);
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.98));
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.ll-wordset-games-length__label {
    margin: 0;
    color: var(--ll-games-ink);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
}

.ll-wordset-games-length__options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ll-wordset-games-length__option {
    min-width: 56px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--ll-games-ink) !important;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

.ll-wordset-games-length__option:hover,
.ll-wordset-games-length__option:focus-visible {
    border-color: rgba(15, 23, 42, 0.24);
    background: #fff;
    outline: none;
}

.ll-wordset-games-length__option.is-active,
.ll-wordset-games-length__option[aria-pressed="true"] {
    border-color: var(--ll-games-accent-border-strong);
    background: linear-gradient(180deg, var(--ll-games-accent) 0%, var(--ll-games-accent-strong) 100%);
    color: #fff !important;
    box-shadow: 0 12px 22px var(--ll-games-accent-shadow);
}

.ll-wordset-game-card {
    --ll-wordset-game-theme-start: var(--ll-games-accent);
    --ll-wordset-game-theme-end: var(--ll-games-accent-strong);
    --ll-wordset-game-theme-hover-start: var(--ll-games-accent-hover);
    --ll-wordset-game-theme-hover-end: var(--ll-games-accent-strong);
    --ll-wordset-game-theme-fg: #fff;
    --ll-wordset-game-theme-icon-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 14px 24px rgba(18, 35, 61, 0.28);
    --ll-wordset-game-theme-button-shadow: 0 12px 20px var(--ll-games-accent-shadow);
    flex: 0 1 460px;
    width: min(100%, 460px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--ll-games-line);
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.98));
    box-shadow: var(--ll-games-shadow);
}

.ll-wordset-game-card__icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--ll-wordset-game-theme-start) 0%, var(--ll-wordset-game-theme-end) 100%);
    color: var(--ll-wordset-game-theme-fg);
    box-shadow: var(--ll-wordset-game-theme-icon-shadow);
}

.ll-wordset-game-card__icon-svg {
    width: 30px;
    height: 30px;
}

.ll-wordset-game-card__body {
    min-width: 0;
}

.ll-wordset-game-card__title {
    margin: 0 0 6px;
    color: var(--ll-games-ink);
    font-size: clamp(1.16rem, 2.4vw, 1.45rem);
    line-height: 1.1;
}

.ll-wordset-game-card__description {
    margin: 0;
    color: rgba(15, 23, 42, 0.76);
    font-size: 0.98rem;
    line-height: 1.45;
}

.ll-wordset-game-card__status {
    margin: 10px 0 0;
    color: rgba(15, 23, 42, 0.72);
    font-size: 0.92rem;
}

.ll-wordset-game-card__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.ll-wordset-game-card__count {
    min-width: 56px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--ll-games-ink);
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ll-wordset-game-card__launch,
.ll-wordset-game-stage__nav,
.ll-wordset-game-stage__control,
.ll-wordset-game-stage__overlay-button {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 14px;
    box-sizing: border-box;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.ll-wordset-game-card__launch {
    min-width: 120px;
    min-height: 46px;
    padding: 0 18px;
    background: linear-gradient(180deg, var(--ll-wordset-game-theme-start) 0%, var(--ll-wordset-game-theme-end) 100%);
    color: var(--ll-wordset-game-theme-fg) !important;
    box-shadow: var(--ll-wordset-game-theme-button-shadow);
}

.ll-wordset-game-card__launch:hover,
.ll-wordset-game-card__launch:focus-visible {
    background: linear-gradient(180deg, var(--ll-wordset-game-theme-hover-start) 0%, var(--ll-wordset-game-theme-hover-end) 100%);
    outline: none;
}

.ll-wordset-game-card__launch[disabled] {
    cursor: not-allowed;
    background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
    color: rgba(255, 255, 255, 0.92) !important;
    box-shadow: none;
}

.ll-wordset-games-login-window {
    margin-top: 22px;
}

.ll-wordset-games-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin: 0 0 24px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid var(--ll-games-accent-border);
    background: linear-gradient(180deg, rgba(242, 246, 252, 0.98) 0%, rgba(221, 232, 247, 0.88) 100%);
    box-shadow: 0 18px 34px rgba(18, 35, 61, 0.08);
    color: var(--ll-games-ink);
}

.ll-wordset-games-notice__text {
    flex: 1 1 280px;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.ll-wordset-games-notice__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--ll-games-accent-border);
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.92) 100%);
    color: var(--ll-games-accent) !important;
    font: inherit;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-sizing: border-box;
}

.ll-wordset-games-notice__link:hover,
.ll-wordset-games-notice__link:focus,
.ll-wordset-games-notice__link:focus-visible {
    border-color: var(--ll-games-accent-border-strong);
    color: var(--ll-games-accent-hover) !important;
    outline: none;
    text-decoration: none;
}

.ll-wordset-game-stage {
    --ll-wordset-game-loader-track: #d3dbea;
    --ll-wordset-game-loader-fade: rgba(18, 35, 61, 0.22);
    --ll-wordset-game-loader-primary: #12233d;
    --ll-wordset-game-loader-secondary: #355178;
    --ll-wordset-game-loader-shadow: rgba(18, 35, 61, 0.34);
    --ll-wordset-game-loader-inner-ring: rgba(18, 35, 61, 0.3);
    position: relative;
    width: 100%;
    box-sizing: border-box;
    max-width: min(100%, 760px, max(420px, calc(100vh - 180px)));
    margin-right: auto;
    margin-top: 16px;
    padding: clamp(14px, 1.5vw, 22px);
    border-radius: clamp(24px, 2.5vw, 36px);
    border: 1px solid rgba(148, 163, 184, 0.22);
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.94));
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.12);
    display: grid;
    align-content: start;
    overflow: hidden;
}

.ll-wordset-game-stage[data-ll-wordset-active-game="bubble-pop"] {
    --ll-wordset-game-loader-track: #d7ecf8;
    --ll-wordset-game-loader-fade: rgba(120, 203, 245, 0.22);
    --ll-wordset-game-loader-primary: #4da1d4;
    --ll-wordset-game-loader-secondary: #9addff;
    --ll-wordset-game-loader-shadow: rgba(77, 161, 212, 0.34);
    --ll-wordset-game-loader-inner-ring: rgba(77, 161, 212, 0.3);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.4), transparent 26%),
        linear-gradient(180deg, rgba(235, 248, 255, 0.96), rgba(221, 240, 252, 0.94));
}

.ll-wordset-game-stage[data-ll-wordset-active-game="bubble-pop"] .ll-wordset-game-stage__canvas-wrap {
    box-shadow:
        inset 0 0 0 1px rgba(143, 197, 228, 0.34),
        0 20px 42px rgba(102, 168, 209, 0.18);
}

.ll-wordset-game-stage[data-ll-wordset-active-game="bubble-pop"] .ll-wordset-game-stage__overlay[data-ll-wordset-game-overlay-mode="paused"] .ll-wordset-game-stage__overlay-button:not(.ll-wordset-game-stage__overlay-button--ghost) {
    background: linear-gradient(180deg, #9addff 0%, #78cbf5 100%);
    color: #0f3b58 !important;
    box-shadow: 0 12px 20px rgba(77, 161, 212, 0.24);
}

.ll-wordset-game-stage[data-ll-wordset-active-game="bubble-pop"] .ll-wordset-game-stage__overlay[data-ll-wordset-game-overlay-mode="paused"] .ll-wordset-game-stage__overlay-button:not(.ll-wordset-game-stage__overlay-button--ghost):hover,
.ll-wordset-game-stage[data-ll-wordset-active-game="bubble-pop"] .ll-wordset-game-stage__overlay[data-ll-wordset-game-overlay-mode="paused"] .ll-wordset-game-stage__overlay-button:not(.ll-wordset-game-stage__overlay-button--ghost):focus-visible {
    background: linear-gradient(180deg, #a7e2ff 0%, #68bde8 100%);
}

.ll-wordset-game-stage__hud {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ll-wordset-game-stage__hud-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: stretch;
    gap: 10px;
}

.ll-wordset-game-stage__nav {
    min-height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    color: var(--ll-games-ink) !important;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

.ll-wordset-game-stage__nav:hover,
.ll-wordset-game-stage__nav:focus,
.ll-wordset-game-stage__nav:focus-visible,
.ll-wordset-game-stage__nav:active {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    color: var(--ll-games-ink) !important;
    border-color: rgba(15, 23, 42, 0.24);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
    text-decoration: none !important;
    outline: none;
}

.ll-wordset-game-stage__nav--replay {
    min-width: auto;
    justify-content: center;
    padding: 8px 10px;
}

.ll-wordset-game-stage__nav--pause {
    min-width: 42px;
    justify-content: center;
    padding: 0;
}

.ll-wordset-game-stage__nav--pause.is-paused {
    color: var(--ll-games-accent-strong) !important;
    border-color: var(--ll-games-accent-border);
}

.ll-wordset-games-page .ll-prompt-audio-button .ll-repeat-audio-ui {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ll-wordset-games-page .ll-prompt-audio-button .ll-repeat-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(29, 77, 153, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    color: #1d4d99;
}

.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-play-icon svg {
    width: 1em;
    height: 1em;
    display: block;
    fill: currentColor;
}

.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-mini-visualizer {
    display: inline-flex;
    align-items: flex-end;
    gap: 6px;
    min-height: 18px;
    --bar-range: 16px;
}

.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-mini-visualizer .bar {
    width: 5px;
    height: calc(var(--base, 12px) + var(--bar-range, 10px) * var(--level, 0));
    border-radius: 3px;
    background: #1d4d99;
    opacity: 1;
    transform-origin: center bottom;
    transition: height 0.18s ease, opacity 0.18s ease;
}

.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-mini-visualizer .bar:nth-child(2) { --base: 14px; }
.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-mini-visualizer .bar:nth-child(3) { --base: 11px; }
.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-mini-visualizer .bar:nth-child(4) { --base: 16px; }
.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-mini-visualizer .bar:nth-child(5) { --base: 13px; }
.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-mini-visualizer .bar:nth-child(6) { --base: 15px; }

.ll-wordset-games-page .ll-prompt-audio-button.playing .ll-audio-mini-visualizer:not(.ll-audio-mini-visualizer--js) .bar,
.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-mini-visualizer.active:not(.ll-audio-mini-visualizer--js) .bar {
    opacity: 1;
    animation: ll-audio-mini-eq 1s ease-in-out infinite;
}

.ll-wordset-games-page .ll-prompt-audio-button.playing .ll-audio-mini-visualizer:not(.ll-audio-mini-visualizer--js) .bar:nth-child(2),
.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-mini-visualizer.active:not(.ll-audio-mini-visualizer--js) .bar:nth-child(2) {
    animation-delay: 0.08s;
}

.ll-wordset-games-page .ll-prompt-audio-button.playing .ll-audio-mini-visualizer:not(.ll-audio-mini-visualizer--js) .bar:nth-child(3),
.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-mini-visualizer.active:not(.ll-audio-mini-visualizer--js) .bar:nth-child(3) {
    animation-delay: 0.15s;
}

.ll-wordset-games-page .ll-prompt-audio-button.playing .ll-audio-mini-visualizer:not(.ll-audio-mini-visualizer--js) .bar:nth-child(4),
.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-mini-visualizer.active:not(.ll-audio-mini-visualizer--js) .bar:nth-child(4) {
    animation-delay: 0.22s;
}

.ll-wordset-games-page .ll-prompt-audio-button.playing .ll-audio-mini-visualizer:not(.ll-audio-mini-visualizer--js) .bar:nth-child(5),
.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-mini-visualizer.active:not(.ll-audio-mini-visualizer--js) .bar:nth-child(5) {
    animation-delay: 0.28s;
}

.ll-wordset-games-page .ll-prompt-audio-button.playing .ll-audio-mini-visualizer:not(.ll-audio-mini-visualizer--js) .bar:nth-child(6),
.ll-wordset-games-page .ll-prompt-audio-button .ll-audio-mini-visualizer.active:not(.ll-audio-mini-visualizer--js) .bar:nth-child(6) {
    animation-delay: 0.34s;
}

@keyframes ll-audio-mini-eq {
    0% { transform: scaleY(0.7); }
    35% { transform: scaleY(1.35); }
    65% { transform: scaleY(0.9); }
    100% { transform: scaleY(1); }
}

.ll-wordset-game-stage__stats {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ll-wordset-game-stage__stat {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ll-games-ink);
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ll-wordset-game-stage__stat-icon {
    color: var(--ll-games-accent-strong);
    font-size: 1rem;
}

.ll-wordset-game-stage__canvas-wrap {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--ll-games-canvas-bg);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
    min-height: 0;
}

.ll-wordset-game-stage__canvas {
    display: block;
    width: 100%;
    height: auto;
    max-height: 78vh;
    touch-action: none;
}

.ll-wordset-game-stage[data-ll-wordset-active-game="bubble-pop"] .ll-wordset-game-stage__canvas {
    cursor: pointer;
    touch-action: manipulation;
}

.ll-wordset-game-stage[data-ll-wordset-active-game="bubble-pop"] .ll-wordset-game-stage__controls {
    display: none;
}

.ll-wordset-game-stage__controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.ll-wordset-game-stage__control {
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #fff 0%, #eef4f8 100%);
    color: var(--ll-games-ink) !important;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 12px 18px rgba(15, 23, 42, 0.07);
    font-size: 1rem;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.ll-wordset-game-stage__control-icon,
.ll-wordset-game-stage__control-fire-stack {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ll-wordset-game-stage__control-arrow {
    width: 28px;
    height: 28px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.15;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ll-wordset-game-stage__control-fire-stack {
    flex-direction: column;
    gap: 7px;
}

.ll-wordset-game-stage__control-burst {
    width: 19px;
    height: 19px;
    display: block;
    fill: currentColor;
}

.ll-wordset-game-stage__control-keycap {
    min-width: 42px;
    height: 18px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1.5px solid currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.ll-wordset-game-stage__control-keycap-bar {
    width: 18px;
    height: 2.5px;
    border-radius: 999px;
    background: currentColor;
}

.ll-wordset-game-stage__control:hover,
.ll-wordset-game-stage__control:focus-visible,
.ll-wordset-game-stage__control.is-active {
    background: linear-gradient(180deg, var(--ll-games-accent-soft) 0%, var(--ll-games-accent-soft-strong) 100%);
    border-color: var(--ll-games-accent-border);
    color: var(--ll-games-accent) !important;
    outline: none;
}

.ll-wordset-game-stage__control--fire {
    min-height: 62px;
    background: linear-gradient(180deg, var(--ll-games-accent) 0%, var(--ll-games-accent-strong) 100%);
    border-color: var(--ll-games-accent-border);
    color: #fff !important;
}

.ll-wordset-game-stage__control--fire:hover,
.ll-wordset-game-stage__control--fire:focus-visible,
.ll-wordset-game-stage__control--fire.is-active {
    background: linear-gradient(180deg, var(--ll-games-accent-hover) 0%, var(--ll-games-accent-strong) 100%);
    border-color: var(--ll-games-accent-border-strong);
    color: #fff !important;
}

.ll-wordset-game-stage__overlay {
    position: absolute;
    inset: 16px;
    z-index: 12;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(10px);
}

.ll-wordset-game-stage__loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    flex: 0 0 auto;
}

.ll-wordset-game-stage__loading-animation.ll-tools-loading-animation {
    position: relative;
    display: block;
    width: 74px;
    height: 74px;
    margin: 0;
    order: 0;
    border: none;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--ll-wordset-game-loader-track) 0deg 360deg
    );
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    box-shadow: none;
    transform: translateZ(0);
    animation: none;
    overflow: visible;
    pointer-events: none;
}

.ll-wordset-game-stage__loading-animation.ll-tools-loading-animation::before,
.ll-wordset-game-stage__loading-animation.ll-tools-loading-animation::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.ll-wordset-game-stage__loading-animation.ll-tools-loading-animation::before {
    inset: 0;
    background: conic-gradient(
        from 8deg,
        transparent 0deg 236deg,
        var(--ll-wordset-game-loader-fade) 254deg,
        var(--ll-wordset-game-loader-primary) 286deg,
        var(--ll-wordset-game-loader-secondary) 316deg,
        transparent 346deg 360deg
    );
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    filter: drop-shadow(0 0 8px var(--ll-wordset-game-loader-shadow));
    animation: ll-wordset-game-loader-segment-sweep 1.05s linear infinite;
}

.ll-wordset-game-stage__loading-animation.ll-tools-loading-animation::after {
    inset: 15px;
    border: 2px solid var(--ll-wordset-game-loader-inner-ring);
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56);
}

@keyframes ll-wordset-game-loader-segment-sweep {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.ll-wordset-game-stage__overlay-card {
    width: min(100%, 420px);
    padding: 24px;
    border-radius: 22px;
    background: #fff;
    color: var(--ll-games-ink);
    text-align: center;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
}

.ll-wordset-game-stage__overlay-title {
    margin: 0 0 8px;
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    line-height: 1.1;
}

.ll-wordset-game-stage__overlay-summary {
    margin: 0;
    color: rgba(15, 23, 42, 0.76);
    font-size: 0.98rem;
    line-height: 1.45;
}

.ll-wordset-game-stage__overlay-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.ll-wordset-game-stage__overlay-button {
    min-height: 46px;
    padding: 0 18px;
    background: linear-gradient(180deg, var(--ll-games-accent) 0%, var(--ll-games-accent-strong) 100%);
    color: #fff !important;
    box-shadow: 0 12px 20px var(--ll-games-accent-shadow-soft);
}

.ll-wordset-game-stage__overlay-button:hover,
.ll-wordset-game-stage__overlay-button:focus-visible {
    background: linear-gradient(180deg, var(--ll-games-accent-hover) 0%, var(--ll-games-accent-strong) 100%);
    outline: none;
}

.ll-wordset-game-stage__overlay-button--ghost {
    background: #fff;
    color: var(--ll-games-ink) !important;
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.ll-wordset-game-stage__overlay-button--ghost:hover,
.ll-wordset-game-stage__overlay-button--ghost:focus-visible {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.28);
}

/* Theme-resistant button hardening for front-end game controls. */
.ll-wordset-games-page button.ll-wordset-game-card__launch,
.ll-wordset-games-page button.ll-wordset-games-length__option,
.ll-wordset-games-page button.ll-wordset-game-stage__nav,
.ll-wordset-games-page button.ll-wordset-game-stage__control,
.ll-wordset-games-page button.ll-wordset-game-stage__overlay-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    border-style: solid !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: 700 !important;
    letter-spacing: normal !important;
    line-height: 1 !important;
    margin: 0 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-shadow: none !important;
    text-transform: none !important;
    vertical-align: middle !important;
}

.ll-wordset-games-page button.ll-wordset-game-card__launch {
    min-width: 120px !important;
    min-height: 46px !important;
    padding: 0 18px !important;
    border-width: 1px !important;
    border-radius: 14px !important;
    border-color: transparent !important;
    background: linear-gradient(180deg, var(--ll-wordset-game-theme-start) 0%, var(--ll-wordset-game-theme-end) 100%) !important;
    background-image: linear-gradient(180deg, var(--ll-wordset-game-theme-start) 0%, var(--ll-wordset-game-theme-end) 100%) !important;
    color: var(--ll-wordset-game-theme-fg) !important;
    box-shadow: var(--ll-wordset-game-theme-button-shadow) !important;
}

.ll-wordset-games-page button.ll-wordset-game-card__launch:hover,
.ll-wordset-games-page button.ll-wordset-game-card__launch:focus,
.ll-wordset-games-page button.ll-wordset-game-card__launch:focus-visible,
.ll-wordset-games-page button.ll-wordset-game-card__launch:active {
    background: linear-gradient(180deg, var(--ll-wordset-game-theme-hover-start) 0%, var(--ll-wordset-game-theme-hover-end) 100%) !important;
    background-image: linear-gradient(180deg, var(--ll-wordset-game-theme-hover-start) 0%, var(--ll-wordset-game-theme-hover-end) 100%) !important;
    color: var(--ll-wordset-game-theme-fg) !important;
    outline: none !important;
}

.ll-wordset-games-page button.ll-wordset-games-length__option {
    min-width: 56px !important;
    min-height: 42px !important;
    padding: 0 16px !important;
    border-width: 1px !important;
    border-radius: 999px !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    background-image: none !important;
    color: var(--ll-games-ink) !important;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06) !important;
}

.ll-wordset-games-page button.ll-wordset-games-length__option:hover,
.ll-wordset-games-page button.ll-wordset-games-length__option:focus,
.ll-wordset-games-page button.ll-wordset-games-length__option:focus-visible,
.ll-wordset-games-page button.ll-wordset-games-length__option:active {
    border-color: rgba(15, 23, 42, 0.24) !important;
    background: #fff !important;
    background-image: none !important;
    color: var(--ll-games-ink) !important;
    outline: none !important;
}

.ll-wordset-games-page button.ll-wordset-games-length__option.is-active,
.ll-wordset-games-page button.ll-wordset-games-length__option[aria-pressed="true"] {
    border-color: var(--ll-games-accent-border-strong) !important;
    background: linear-gradient(180deg, var(--ll-games-accent) 0%, var(--ll-games-accent-strong) 100%) !important;
    background-image: linear-gradient(180deg, var(--ll-games-accent) 0%, var(--ll-games-accent-strong) 100%) !important;
    color: #fff !important;
    box-shadow: 0 12px 22px var(--ll-games-accent-shadow) !important;
}

.ll-wordset-games-page button.ll-wordset-game-card__launch[disabled] {
    cursor: not-allowed !important;
    background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%) !important;
    background-image: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    box-shadow: none !important;
}

.ll-wordset-games-page button.ll-wordset-game-stage__nav {
    min-height: 42px !important;
    padding: 0 14px !important;
    gap: 8px !important;
    border-width: 1px !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%) !important;
    background-color: #eff6ff !important;
    background-image: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%) !important;
    border-color: rgba(29, 77, 153, 0.14) !important;
    box-shadow: 0 10px 20px rgba(29, 77, 153, 0.12) !important;
    color: var(--ll-games-ink) !important;
}

.ll-wordset-games-page button.ll-wordset-game-stage__nav:hover,
.ll-wordset-games-page button.ll-wordset-game-stage__nav:focus,
.ll-wordset-games-page button.ll-wordset-game-stage__nav:focus-visible,
.ll-wordset-games-page button.ll-wordset-game-stage__nav:active {
    background: linear-gradient(180deg, #e0eeff 0%, #c7defd 100%) !important;
    background-color: #e0eeff !important;
    background-image: linear-gradient(180deg, #e0eeff 0%, #c7defd 100%) !important;
    border-color: rgba(29, 77, 153, 0.26) !important;
    box-shadow: 0 12px 22px rgba(29, 77, 153, 0.14) !important;
    color: var(--ll-games-ink) !important;
    outline: none !important;
}

.ll-wordset-games-page button.ll-wordset-game-stage__nav--replay {
    min-width: auto !important;
    justify-content: center !important;
    padding: 8px 10px !important;
}

.ll-wordset-games-page button.ll-wordset-game-stage__nav--pause {
    min-width: 42px !important;
    justify-content: center !important;
    padding: 0 !important;
}

.ll-wordset-games-page button.ll-wordset-game-stage__nav--pause.is-paused {
    color: var(--ll-games-accent-strong) !important;
    border-color: var(--ll-games-accent-border) !important;
}

.ll-wordset-games-page button.ll-wordset-game-stage__control {
    min-height: 56px !important;
    border-width: 1px !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, #fff 0%, #eef4f8 100%) !important;
    background-image: linear-gradient(180deg, #fff 0%, #eef4f8 100%) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 12px 18px rgba(15, 23, 42, 0.07) !important;
    color: var(--ll-games-ink) !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    touch-action: manipulation !important;
}

.ll-wordset-games-page button.ll-wordset-game-stage__control:hover,
.ll-wordset-games-page button.ll-wordset-game-stage__control:focus,
.ll-wordset-games-page button.ll-wordset-game-stage__control:focus-visible,
.ll-wordset-games-page button.ll-wordset-game-stage__control:active,
.ll-wordset-games-page button.ll-wordset-game-stage__control.is-active {
    background: linear-gradient(180deg, var(--ll-games-accent-soft) 0%, var(--ll-games-accent-soft-strong) 100%) !important;
    background-image: linear-gradient(180deg, var(--ll-games-accent-soft) 0%, var(--ll-games-accent-soft-strong) 100%) !important;
    border-color: var(--ll-games-accent-border) !important;
    color: var(--ll-games-accent) !important;
    outline: none !important;
}

.ll-wordset-games-page button.ll-wordset-game-stage__control--fire {
    min-height: 62px !important;
    background: linear-gradient(180deg, var(--ll-games-accent) 0%, var(--ll-games-accent-strong) 100%) !important;
    background-image: linear-gradient(180deg, var(--ll-games-accent) 0%, var(--ll-games-accent-strong) 100%) !important;
    border-color: var(--ll-games-accent-border) !important;
    color: #fff !important;
}

.ll-wordset-games-page button.ll-wordset-game-stage__control--fire:hover,
.ll-wordset-games-page button.ll-wordset-game-stage__control--fire:focus,
.ll-wordset-games-page button.ll-wordset-game-stage__control--fire:focus-visible,
.ll-wordset-games-page button.ll-wordset-game-stage__control--fire:active,
.ll-wordset-games-page button.ll-wordset-game-stage__control--fire.is-active {
    background: linear-gradient(180deg, var(--ll-games-accent-hover) 0%, var(--ll-games-accent-strong) 100%) !important;
    background-image: linear-gradient(180deg, var(--ll-games-accent-hover) 0%, var(--ll-games-accent-strong) 100%) !important;
    border-color: var(--ll-games-accent-border-strong) !important;
    color: #fff !important;
}

.ll-wordset-games-page button.ll-wordset-game-stage__overlay-button {
    min-height: 46px !important;
    padding: 0 18px !important;
    border-width: 1px !important;
    border-radius: 14px !important;
    border-color: transparent !important;
    background: linear-gradient(180deg, var(--ll-games-accent) 0%, var(--ll-games-accent-strong) 100%) !important;
    background-image: linear-gradient(180deg, var(--ll-games-accent) 0%, var(--ll-games-accent-strong) 100%) !important;
    color: #fff !important;
    box-shadow: 0 12px 20px var(--ll-games-accent-shadow-soft) !important;
}

.ll-wordset-games-page button.ll-wordset-game-stage__overlay-button:hover,
.ll-wordset-games-page button.ll-wordset-game-stage__overlay-button:focus,
.ll-wordset-games-page button.ll-wordset-game-stage__overlay-button:focus-visible,
.ll-wordset-games-page button.ll-wordset-game-stage__overlay-button:active {
    background: linear-gradient(180deg, var(--ll-games-accent-hover) 0%, var(--ll-games-accent-strong) 100%) !important;
    background-image: linear-gradient(180deg, var(--ll-games-accent-hover) 0%, var(--ll-games-accent-strong) 100%) !important;
    color: #fff !important;
    outline: none !important;
}

.ll-wordset-games-page button.ll-wordset-game-stage__overlay-button--ghost {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    border-color: rgba(15, 23, 42, 0.14) !important;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08) !important;
    color: var(--ll-games-ink) !important;
}

.ll-wordset-games-page button.ll-wordset-game-stage__overlay-button--ghost:hover,
.ll-wordset-games-page button.ll-wordset-game-stage__overlay-button--ghost:focus,
.ll-wordset-games-page button.ll-wordset-game-stage__overlay-button--ghost:focus-visible,
.ll-wordset-games-page button.ll-wordset-game-stage__overlay-button--ghost:active {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
    background-image: none !important;
    border-color: rgba(15, 23, 42, 0.28) !important;
    color: var(--ll-games-ink) !important;
}

.ll-wordset-games-page .ll-wordset-game-stage[data-ll-wordset-active-game="bubble-pop"] .ll-wordset-game-stage__overlay[data-ll-wordset-game-overlay-mode="paused"] button.ll-wordset-game-stage__overlay-button:not(.ll-wordset-game-stage__overlay-button--ghost) {
    background: linear-gradient(180deg, #9addff 0%, #78cbf5 100%) !important;
    background-image: linear-gradient(180deg, #9addff 0%, #78cbf5 100%) !important;
    color: #0f3b58 !important;
    box-shadow: 0 12px 20px rgba(77, 161, 212, 0.24) !important;
}

.ll-wordset-games-page .ll-wordset-game-stage[data-ll-wordset-active-game="bubble-pop"] .ll-wordset-game-stage__overlay[data-ll-wordset-game-overlay-mode="paused"] button.ll-wordset-game-stage__overlay-button:not(.ll-wordset-game-stage__overlay-button--ghost):hover,
.ll-wordset-games-page .ll-wordset-game-stage[data-ll-wordset-active-game="bubble-pop"] .ll-wordset-game-stage__overlay[data-ll-wordset-game-overlay-mode="paused"] button.ll-wordset-game-stage__overlay-button:not(.ll-wordset-game-stage__overlay-button--ghost):focus,
.ll-wordset-games-page .ll-wordset-game-stage[data-ll-wordset-active-game="bubble-pop"] .ll-wordset-game-stage__overlay[data-ll-wordset-game-overlay-mode="paused"] button.ll-wordset-game-stage__overlay-button:not(.ll-wordset-game-stage__overlay-button--ghost):focus-visible,
.ll-wordset-games-page .ll-wordset-game-stage[data-ll-wordset-active-game="bubble-pop"] .ll-wordset-game-stage__overlay[data-ll-wordset-game-overlay-mode="paused"] button.ll-wordset-game-stage__overlay-button:not(.ll-wordset-game-stage__overlay-button--ghost):active {
    background: linear-gradient(180deg, #a7e2ff 0%, #68bde8 100%) !important;
    background-image: linear-gradient(180deg, #a7e2ff 0%, #68bde8 100%) !important;
    color: #0f3b58 !important;
}

.ll-wordset-game-card[data-game-slug="bubble-pop"] {
    --ll-wordset-game-theme-start: #9addff;
    --ll-wordset-game-theme-end: #78cbf5;
    --ll-wordset-game-theme-hover-start: #a7e2ff;
    --ll-wordset-game-theme-hover-end: #68bde8;
    --ll-wordset-game-theme-fg: #0f3b58;
    --ll-wordset-game-theme-icon-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 14px 24px rgba(77, 161, 212, 0.26);
    --ll-wordset-game-theme-button-shadow: 0 12px 20px rgba(77, 161, 212, 0.24);
}

.ll-wordset-game-card[data-game-slug="speaking-practice"] {
    --ll-wordset-game-theme-start: #f59e0b;
    --ll-wordset-game-theme-end: #c2410c;
    --ll-wordset-game-theme-hover-start: #f7ad24;
    --ll-wordset-game-theme-hover-end: #b45309;
    --ll-wordset-game-theme-fg: #fff7ed;
    --ll-wordset-game-theme-icon-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 14px 24px rgba(194, 65, 12, 0.24);
    --ll-wordset-game-theme-button-shadow: 0 12px 20px rgba(194, 65, 12, 0.24);
}

.ll-wordset-game-card[data-game-slug="speaking-stack"] {
    --ll-wordset-game-theme-start: #83c643;
    --ll-wordset-game-theme-end: #4c8e28;
    --ll-wordset-game-theme-hover-start: #91d850;
    --ll-wordset-game-theme-hover-end: #3f7d1f;
    --ll-wordset-game-theme-fg: #f7fde8;
    --ll-wordset-game-theme-icon-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 24px rgba(76, 142, 40, 0.24);
    --ll-wordset-game-theme-button-shadow: 0 12px 20px rgba(76, 142, 40, 0.24);
}

.ll-wordset-game-card[data-game-slug="line-up"] {
    --ll-wordset-game-theme-start: #0f766e;
    --ll-wordset-game-theme-end: #115e59;
    --ll-wordset-game-theme-hover-start: #149289;
    --ll-wordset-game-theme-hover-end: #0f766e;
    --ll-wordset-game-theme-fg: #ecfeff;
    --ll-wordset-game-theme-icon-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 14px 24px rgba(15, 118, 110, 0.24);
    --ll-wordset-game-theme-button-shadow: 0 12px 20px rgba(15, 118, 110, 0.24);
}

.ll-wordset-game-card[data-game-slug="unscramble"] {
    --ll-wordset-game-theme-start: #b45309;
    --ll-wordset-game-theme-end: #9a3412;
    --ll-wordset-game-theme-hover-start: #c46b1d;
    --ll-wordset-game-theme-hover-end: #b45309;
    --ll-wordset-game-theme-fg: #fff7ed;
    --ll-wordset-game-theme-icon-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 14px 24px rgba(180, 83, 9, 0.24);
    --ll-wordset-game-theme-button-shadow: 0 12px 20px rgba(180, 83, 9, 0.24);
}

.ll-wordset-game-stage[data-ll-wordset-active-game="speaking-practice"] {
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.24), transparent 26%),
        linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 247, 237, 0.96));
    overflow-y: auto;
    max-width: min(100%, 1160px);
}

.ll-wordset-game-stage[data-ll-wordset-active-game="speaking-practice"] .ll-wordset-game-stage__nav--pause {
    display: none !important;
}

.ll-wordset-game-stage[data-ll-wordset-active-game="speaking-stack"] {
    background:
        radial-gradient(circle at top left, rgba(134, 239, 172, 0.18), transparent 24%),
        linear-gradient(180deg, rgba(247, 252, 255, 0.98), rgba(242, 250, 235, 0.96));
}

.ll-wordset-game-stage[data-ll-wordset-active-game="speaking-stack"] .ll-wordset-game-stage__canvas-wrap {
    box-shadow:
        inset 0 0 0 1px rgba(134, 239, 172, 0.18),
        0 20px 42px rgba(76, 142, 40, 0.16);
}

.ll-wordset-game-stage[data-ll-wordset-active-game="speaking-stack"] .ll-wordset-game-stage__controls {
    display: none;
}

.ll-wordset-game-stage[data-ll-wordset-active-game="line-up"] {
    background:
        radial-gradient(circle at top left, rgba(94, 234, 212, 0.18), transparent 26%),
        linear-gradient(180deg, rgba(248, 255, 254, 0.98), rgba(240, 253, 250, 0.96));
    max-width: min(100%, 1120px);
    grid-template-rows: auto minmax(0, 1fr);
}

.ll-wordset-game-stage[data-ll-wordset-active-game="line-up"] .ll-wordset-game-stage__canvas-wrap {
    background:
        radial-gradient(circle at top, rgba(45, 212, 191, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.94));
    box-shadow:
        inset 0 0 0 1px rgba(19, 78, 74, 0.1),
        0 20px 42px rgba(15, 118, 110, 0.12);
}

.ll-wordset-game-stage[data-ll-wordset-active-game="unscramble"] {
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.2), transparent 28%),
        linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 247, 237, 0.96));
    max-width: min(100%, 1120px);
    grid-template-rows: auto minmax(0, 1fr);
}

.ll-wordset-game-stage[data-ll-wordset-active-game="unscramble"] .ll-wordset-game-stage__canvas-wrap {
    background:
        radial-gradient(circle at top, rgba(251, 191, 36, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.94));
    box-shadow:
        inset 0 0 0 1px rgba(146, 64, 14, 0.1),
        0 20px 42px rgba(180, 83, 9, 0.12);
}

.ll-wordset-game-stage[data-ll-wordset-active-game="line-up"] .ll-wordset-game-stage__canvas-wrap,
.ll-wordset-game-stage[data-ll-wordset-active-game="unscramble"] .ll-wordset-game-stage__canvas-wrap {
    min-height: 0;
    height: 100%;
    display: grid;
}

.ll-wordset-lineup-stage {
    min-height: 0;
    height: 100%;
    padding: clamp(14px, 2vw, 20px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
    gap: 14px;
    align-content: stretch;
    overflow: hidden;
}

.ll-wordset-lineup-stage__topline,
.ll-wordset-lineup-stage__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ll-wordset-lineup-stage__progress,
.ll-wordset-lineup-stage__category,
.ll-wordset-lineup-stage__status {
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.14);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.1);
    color: #134e4a;
}

.ll-wordset-lineup-stage__progress,
.ll-wordset-lineup-stage__category {
    display: inline-flex;
    align-items: center;
    font-weight: 800;
}

.ll-wordset-lineup-stage__category {
    color: #0f172a;
}

.ll-wordset-lineup-stage__instruction {
    margin: 0;
    color: rgba(15, 23, 42, 0.78);
    font-size: 0.95rem;
    font-weight: 700;
    grid-row: 2;
}

.ll-wordset-lineup-stage__prompt {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    min-height: 0;
    grid-row: 3;
}

.ll-wordset-lineup-stage__prompt-image-frame {
    margin: 0;
    width: min(220px, 100%);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.ll-wordset-lineup-stage__prompt-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.ll-wordset-lineup-stage__prompt-text-wrap {
    flex: 1 1 260px;
    min-height: 52px;
    padding: 14px 18px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.ll-wordset-lineup-stage__prompt-text {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.05rem, 2vw, 1.32rem);
    font-weight: 800;
    line-height: 1.4;
}

.ll-wordset-lineup-stage__status {
    margin: 0;
    display: inline-flex;
    align-items: center;
    font-weight: 800;
    grid-row: 4;
}

.ll-wordset-lineup-stage__status[data-lineup-status-kind="correct"] {
    border-color: rgba(22, 163, 74, 0.22);
    color: #166534;
    background: rgba(240, 253, 244, 0.96);
}

.ll-wordset-lineup-stage__status[data-lineup-status-kind="incorrect"] {
    border-color: rgba(220, 38, 38, 0.18);
    color: #991b1b;
    background: rgba(254, 242, 242, 0.96);
}

.ll-wordset-lineup-stage__cards {
    margin: 0;
    padding: 2px 2px 10px;
    list-style: none;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    min-height: 0;
    grid-row: 5;
}

.ll-wordset-lineup-stage__card {
    min-width: clamp(160px, 22vw, 260px);
    max-width: min(320px, 78vw);
    padding: 14px;
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px;
}

.ll-wordset-lineup-stage__card.is-correct {
    border-color: rgba(22, 163, 74, 0.22);
    background:
        linear-gradient(180deg, rgba(240, 253, 244, 0.98), rgba(220, 252, 231, 0.94));
    box-shadow: 0 18px 36px rgba(22, 163, 74, 0.12);
}

.ll-wordset-lineup-stage__card.is-incorrect {
    border-color: rgba(220, 38, 38, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(254, 242, 242, 0.94));
    box-shadow: 0 18px 36px rgba(220, 38, 38, 0.08);
}

.ll-wordset-lineup-stage__card-order {
    min-width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #0f766e 0%, #115e59 100%);
    color: #f0fdfa;
    font-weight: 900;
    box-shadow: 0 10px 18px rgba(15, 118, 110, 0.22);
}

.ll-wordset-lineup-stage__card-body {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.ll-wordset-lineup-stage__card-text {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    word-break: break-word;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__cards {
    --ll-unscramble-gap-size: clamp(4px, 0.55vw, 8px);
    --ll-unscramble-tile-max-size: clamp(58px, 9vw, 112px);
    --ll-unscramble-track-size: min(
        var(--ll-unscramble-tile-max-size),
        calc(
            (100% - ((var(--ll-unscramble-unit-count, 8) - 1) * var(--ll-unscramble-gap-size)))
            / var(--ll-unscramble-unit-count, 8)
        )
    );
    display: grid;
    grid-template-columns: repeat(var(--ll-unscramble-unit-count, 8), minmax(0, var(--ll-unscramble-track-size)));
    gap: var(--ll-unscramble-gap-size);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: none;
    justify-content: center;
    align-content: start;
    align-items: stretch;
    padding: 1px 0 2px;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] {
    min-height: 0;
    height: 100%;
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    grid-template-areas:
        "topline"
        "instruction"
        "prompt"
        "status"
        "cards";
    row-gap: clamp(8px, 1vw, 12px);
}

.ll-wordset-lineup-stage__card--tile {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: clamp(40px, calc(92px - (var(--ll-unscramble-unit-count, 8) * 3.5px)), 86px);
    max-height: clamp(52px, 13vh, 86px);
    aspect-ratio: 1 / 1;
    padding: clamp(1px, 0.35vw, 5px);
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-items: stretch;
    position: relative;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        border-color 160ms ease;
}

.ll-wordset-lineup-stage__card--tile.is-static {
    border-style: dashed;
    opacity: 0.9;
}

.ll-wordset-lineup-stage__card-text--tile {
    font-size: clamp(0.92rem, calc(2.45rem - (var(--ll-unscramble-unit-count, 8) * 0.12rem)), 2.15rem);
    line-height: 0.92;
    text-align: center;
    font-weight: 900;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__card-order {
    min-width: 28px;
    height: 28px;
    font-size: 0.74rem;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__card-body {
    height: 100%;
    gap: 0;
    align-content: center;
    justify-items: center;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__prompt-image-frame {
    width: min(100%, 180px);
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__actions {
    grid-area: topline;
    position: relative;
    justify-self: end;
    align-self: start;
    justify-content: flex-end;
    min-height: 46px;
    padding-top: 0;
    background: none;
    z-index: 2;
    width: auto;
    margin: 0;
    flex-wrap: nowrap;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__action {
    flex: 1 1 120px;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__action--skip {
    flex: 0 0 auto;
    min-width: 0;
    width: fit-content;
    padding-inline: 18px;
    margin-left: 0;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__topline {
    grid-area: topline;
    padding-right: clamp(120px, 14vw, 168px);
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__instruction {
    grid-area: instruction;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__prompt {
    grid-area: prompt;
    align-self: start;
    align-content: start;
    flex-direction: column;
    align-items: stretch;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"]:not([data-lineup-prompt-type="image"]) .ll-wordset-lineup-stage__prompt {
    flex-direction: row;
    align-items: flex-start;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"]:not([data-lineup-prompt-type="image"]) .ll-wordset-lineup-stage__prompt-text-wrap {
    display: inline-flex;
    align-items: center;
    width: auto;
    max-width: min(100%, 34rem);
    min-height: 0;
    padding: 10px 14px;
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    flex: 0 1 auto;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"]:not([data-lineup-prompt-type="image"]) .ll-wordset-lineup-stage__prompt-text {
    font-size: clamp(1rem, 1.7vw, 1.22rem);
    line-height: 1.18;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__status {
    grid-area: status;
    min-height: 34px;
    padding: 6px 12px;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__cards {
    grid-area: cards;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__card--tile[data-ll-wordset-unscramble-tile] {
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__card--tile[data-ll-wordset-unscramble-tile]:focus-visible {
    outline: 3px solid rgba(217, 119, 6, 0.38);
    outline-offset: 2px;
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__card--tile.is-dragging {
    cursor: grabbing;
    z-index: 4;
    transform: translate3d(var(--ll-unscramble-drag-x, 0px), var(--ll-unscramble-drag-y, 0px), 0) scale(1.04);
    box-shadow: 0 22px 36px rgba(180, 83, 9, 0.22);
}

.ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__card--tile.is-drop-target {
    border-color: rgba(217, 119, 6, 0.34);
    box-shadow: 0 16px 30px rgba(217, 119, 6, 0.16);
}

.ll-wordset-lineup-stage__move--placeholder {
    display: inline-block;
    width: 44px;
    min-height: 42px;
    opacity: 0;
}

.ll-wordset-lineup-stage__card-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ll-wordset-lineup-stage__topline {
    grid-row: 1;
}

.ll-wordset-lineup-stage__actions {
    grid-row: 6;
    position: relative;
    z-index: 1;
    padding-top: 4px;
}

.ll-wordset-games-page button.ll-wordset-lineup-stage__move,
.ll-wordset-games-page button.ll-wordset-lineup-stage__action {
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff !important;
    background-image: none !important;
    color: var(--ll-games-ink) !important;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    text-decoration: none !important;
}

.ll-wordset-games-page button.ll-wordset-lineup-stage__move {
    min-width: 44px;
    padding: 0 12px;
    font-size: 1.05rem;
    font-weight: 900;
}

.ll-wordset-games-page button.ll-wordset-lineup-stage__action {
    padding: 0 16px;
    font-weight: 800;
}

.ll-wordset-games-page button.ll-wordset-lineup-stage__move:hover,
.ll-wordset-games-page button.ll-wordset-lineup-stage__move:focus,
.ll-wordset-games-page button.ll-wordset-lineup-stage__move:focus-visible,
.ll-wordset-games-page button.ll-wordset-lineup-stage__move:active,
.ll-wordset-games-page button.ll-wordset-lineup-stage__action:hover,
.ll-wordset-games-page button.ll-wordset-lineup-stage__action:focus,
.ll-wordset-games-page button.ll-wordset-lineup-stage__action:focus-visible,
.ll-wordset-games-page button.ll-wordset-lineup-stage__action:active {
    border-color: rgba(15, 23, 42, 0.24);
    background: #fff !important;
    background-image: none !important;
    color: var(--ll-games-ink) !important;
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.1);
    outline: none;
}

.ll-wordset-games-page button.ll-wordset-lineup-stage__move[disabled],
.ll-wordset-games-page button.ll-wordset-lineup-stage__action[disabled] {
    opacity: 0.52;
    cursor: default;
    box-shadow: none;
}

.ll-wordset-games-page button.ll-wordset-lineup-stage__action--primary {
    background: linear-gradient(180deg, #0f766e 0%, #115e59 100%) !important;
    border-color: rgba(15, 118, 110, 0.28);
    color: #f0fdfa !important;
    box-shadow: 0 14px 24px rgba(15, 118, 110, 0.22);
}

.ll-wordset-games-page button.ll-wordset-lineup-stage__action--primary:hover,
.ll-wordset-games-page button.ll-wordset-lineup-stage__action--primary:focus,
.ll-wordset-games-page button.ll-wordset-lineup-stage__action--primary:focus-visible,
.ll-wordset-games-page button.ll-wordset-lineup-stage__action--primary:active {
    background: linear-gradient(180deg, #149289 0%, #0f766e 100%) !important;
    border-color: rgba(15, 118, 110, 0.34);
    color: #f0fdfa !important;
}

.ll-wordset-games-page button.ll-wordset-lineup-stage__action--ghost {
    background: rgba(255, 255, 255, 0.94) !important;
}

@media (min-width: 980px) {
    .ll-wordset-lineup-stage[data-lineup-mode="unscramble"][data-lineup-prompt-type="image"] {
        grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
        grid-template-rows: auto auto auto minmax(0, 1fr) auto;
        grid-template-areas:
            "topline topline"
            "instruction instruction"
            "prompt status"
            "prompt cards"
            "actions actions";
        column-gap: clamp(16px, 2vw, 24px);
    }
}

.ll-wordset-speaking-stack-stage {
    position: absolute;
    inset: 12px 12px auto;
    display: grid;
    gap: 10px;
    z-index: 2;
    pointer-events: none;
}

.ll-wordset-speaking-stack-stage__topline,
.ll-wordset-speaking-stack-stage__heard-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ll-wordset-speaking-stack-stage__progress,
.ll-wordset-speaking-stack-stage__status,
.ll-wordset-speaking-stack-stage__heard-row {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(76, 142, 40, 0.16);
    color: #335f1b;
    box-shadow: 0 10px 24px rgba(76, 142, 40, 0.14);
    backdrop-filter: blur(10px);
}

.ll-wordset-speaking-stack-stage__progress,
.ll-wordset-speaking-stack-stage__status {
    display: inline-flex;
    align-items: center;
    font-weight: 800;
}

.ll-wordset-speaking-stack-stage__heard-row {
    display: inline-flex;
    align-items: center;
}

.ll-wordset-speaking-stack-stage__heard-label {
    color: rgba(51, 95, 27, 0.68);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ll-wordset-speaking-stack-stage__heard {
    color: #163300;
    font-weight: 800;
    line-height: 1.3;
    word-break: break-word;
}

.ll-wordset-speaking-stack-stage__meter {
    width: min(100%, 228px);
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 5px;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px);
}

.ll-wordset-speaking-stack-stage__meter-bar {
    --ll-speaking-meter-level: 0.08;
    height: 100%;
    min-height: 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #d9f99d 0%, #84cc16 54%, #4d7c0f 100%);
    transform-origin: center bottom;
    transform: scaleY(var(--ll-speaking-meter-level));
    transition: transform 80ms linear;
}

.ll-wordset-speaking-stack-stage__status[data-speaking-stack-status-kind="record"] {
    min-width: 42px;
    justify-content: center;
    padding-inline: 10px;
}

.ll-wordset-speaking-stack-stage__status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #3f7d1f;
    filter: drop-shadow(0 2px 4px rgba(76, 142, 40, 0.18));
}

.ll-wordset-speaking-stack-stage__status-icon-svg {
    display: block;
    width: 18px;
    height: 18px;
}

.ll-wordset-speaking-stack-stage__heard .ll-wordset-speaking-stage__diff-fragment--heard {
    background: rgba(239, 68, 68, 0.22);
    box-shadow: inset 0 -0.08em 0 rgba(220, 38, 38, 0.32);
}

.ll-wordset-speaking-stage {
    display: grid;
    grid-template-columns: minmax(0, clamp(220px, 24vw, 290px)) minmax(320px, 1fr);
    grid-template-areas:
        "topline topline"
        "prompt meter"
        "prompt actions"
        "prompt result";
    gap: clamp(10px, 1.4vw, 14px);
    padding: clamp(6px, 1vw, 10px);
    align-content: start;
    align-items: start;
}

.ll-wordset-speaking-stage__topline {
    grid-area: topline;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ll-wordset-speaking-stage__round,
.ll-wordset-speaking-stage__status {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(194, 65, 12, 0.14);
    color: #7c2d12;
    font-weight: 700;
}

.ll-wordset-speaking-stage__prompt-shell {
    grid-area: prompt;
    width: min(100%, clamp(220px, 24vw, 290px));
    justify-self: start;
    perspective: 1200px;
}

.ll-wordset-speaking-stage__prompt-card {
    min-height: clamp(150px, 20vh, 210px);
    display: grid;
    place-items: center;
    padding: clamp(12px, 1.8vw, 18px);
    border-radius: 22px;
    border: 1px solid rgba(194, 65, 12, 0.12);
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.22), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.94));
    box-shadow: 0 26px 60px rgba(124, 45, 18, 0.12);
    transform: translateX(0);
    transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
    overflow: hidden;
}

.ll-wordset-speaking-stage__prompt-card.is-entering {
    animation: ll-speaking-prompt-enter 380ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.ll-wordset-speaking-stage__prompt-card.has-image {
    padding: 0;
    aspect-ratio: 1 / 1;
    background: rgba(255, 255, 255, 0.55);
}

.ll-wordset-speaking-stage__prompt-card.has-text {
    place-items: center;
}

.ll-wordset-speaking-stage__prompt-card[data-speaking-result="right"] {
    border-color: rgba(22, 163, 74, 0.32);
    box-shadow: 0 26px 60px rgba(22, 163, 74, 0.14);
}

.ll-wordset-speaking-stage__prompt-card[data-speaking-result="close"] {
    border-color: rgba(202, 138, 4, 0.32);
    box-shadow: 0 26px 60px rgba(202, 138, 4, 0.14);
}

.ll-wordset-speaking-stage__prompt-card[data-speaking-result="wrong"] {
    border-color: rgba(220, 38, 38, 0.28);
    box-shadow: 0 26px 60px rgba(220, 38, 38, 0.12);
}

.ll-wordset-speaking-stage__image-frame {
    width: 100%;
    height: 100%;
    margin: 0;
    display: grid;
    place-items: stretch;
}

.ll-wordset-speaking-stage__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ll-wordset-speaking-stage__text-prompt {
    width: 100%;
    display: grid;
    place-items: center;
}

.ll-wordset-speaking-stage__text {
    margin: 0;
    color: #7c2d12;
    font-size: clamp(1.8rem, 5vw, 3rem);
    line-height: 1.08;
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.ll-wordset-speaking-stage__meter {
    grid-area: meter;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 6px;
    min-height: 60px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(194, 65, 12, 0.12);
    box-shadow: 0 16px 34px rgba(124, 45, 18, 0.08);
}

.ll-wordset-speaking-stage__meter-bar {
    --ll-speaking-meter-level: 0.08;
    height: 100%;
    min-height: 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, #fbbf24 0%, #ea580c 100%);
    transform-origin: center bottom;
    transform: scaleY(var(--ll-speaking-meter-level));
    transition: transform 80ms linear;
}

.ll-wordset-speaking-stage__actions,
.ll-wordset-speaking-stage__result-actions {
    display: flex;
    gap: 12px;
}

.ll-wordset-speaking-stage__actions {
    grid-area: actions;
    align-items: center;
    justify-content: flex-start;
}

.ll-wordset-speaking-stage__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: linear-gradient(180deg, #f59e0b 0%, #c2410c 100%);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 24px rgba(194, 65, 12, 0.2);
}

.ll-wordset-speaking-stage__action--record {
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 999px;
    background: #e74c3c;
    background-image: none;
    box-shadow: 0 10px 24px rgba(231, 76, 60, 0.28);
}

.ll-wordset-speaking-stage__record-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #ffffff;
}

.ll-wordset-speaking-stage__record-icon-svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: currentColor !important;
}

.ll-wordset-speaking-stage__action--record:hover:not([disabled]),
.ll-wordset-speaking-stage__action--record:focus-visible {
    background: #c0392b;
    background-image: none;
    transform: scale(1.05);
}

.ll-wordset-speaking-stage__action--record[data-speaking-state="listening"] {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    background-image: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: ll-speaking-record-pulse 1.5s infinite;
    opacity: 1;
}

.ll-wordset-speaking-stage__action--record[data-speaking-state="processing"] {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    background-image: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    box-shadow: 0 10px 22px rgba(19, 94, 150, 0.24);
    opacity: 1;
}

.ll-wordset-speaking-stage__action--record[data-speaking-state="retry"] {
    background: linear-gradient(180deg, #f59e0b 0%, #c2410c 100%);
    background-image: linear-gradient(180deg, #f59e0b 0%, #c2410c 100%);
    box-shadow: 0 14px 24px rgba(194, 65, 12, 0.2);
}

.ll-wordset-speaking-stage__action[disabled] {
    cursor: wait;
    opacity: 0.7;
    box-shadow: none;
}

.ll-wordset-speaking-stage__action--record[data-speaking-state="listening"][disabled],
.ll-wordset-speaking-stage__action--record[data-speaking-state="processing"][disabled] {
    opacity: 1;
}

.ll-wordset-speaking-stage__action--record[data-speaking-state="listening"][disabled] {
    box-shadow: 0 10px 24px rgba(231, 76, 60, 0.28);
}

.ll-wordset-speaking-stage__action--record[data-speaking-state="processing"][disabled] {
    box-shadow: 0 10px 22px rgba(19, 94, 150, 0.24);
}

.ll-wordset-speaking-stage__action--ghost {
    background: rgba(255, 255, 255, 0.8);
    color: #7c2d12;
    border-color: rgba(194, 65, 12, 0.16);
    box-shadow: none;
}

.ll-wordset-speaking-stage__result {
    grid-area: result;
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(194, 65, 12, 0.12);
    box-shadow: 0 18px 40px rgba(124, 45, 18, 0.08);
    align-self: start;
}

.ll-wordset-speaking-stage__comparison {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ll-wordset-speaking-stage__comparison-card {
    min-height: 0;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 251, 235, 0.9);
    border: 1px solid rgba(194, 65, 12, 0.12);
    display: grid;
    align-content: start;
    gap: 8px;
}

.ll-wordset-speaking-stage__comparison-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ll-wordset-speaking-stage__comparison-label {
    margin: 0;
    color: rgba(124, 45, 18, 0.7);
    font-size: 0.82rem;
    font-weight: 700;
}

.ll-wordset-speaking-stage__comparison-meta {
    margin: 0;
    color: rgba(124, 45, 18, 0.62);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.ll-wordset-speaking-stage__comparison-value {
    margin: 0;
    color: #431407;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.2;
    word-break: break-word;
    white-space: pre-wrap;
}

.ll-wordset-speaking-stage__diff-fragment {
    display: inline;
    border-radius: 0.35em;
    padding: 0 0.08em;
}

.ll-wordset-speaking-stage__diff-fragment--heard {
    background: rgba(239, 68, 68, 0.18);
    box-shadow: inset 0 -0.08em 0 rgba(220, 38, 38, 0.28);
}

.ll-wordset-speaking-stage__diff-fragment--target {
    background: rgba(245, 158, 11, 0.18);
    box-shadow: inset 0 -0.08em 0 rgba(217, 119, 6, 0.24);
}

.ll-wordset-speaking-stage__audio-button {
    appearance: none;
    border: 1px solid rgba(194, 65, 12, 0.16) !important;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 9px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96) !important;
    background-image: none !important;
    box-shadow: 0 8px 18px rgba(29, 77, 153, 0.1) !important;
    -webkit-tap-highlight-color: transparent;
}

.ll-wordset-speaking-stage__audio-button .ll-repeat-icon-wrap {
    border: 1px solid rgba(29, 77, 153, 0.14);
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%) !important;
    color: #1d4d99 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 6px 14px rgba(29, 77, 153, 0.12);
}

.ll-wordset-speaking-stage__audio-button .ll-audio-mini-visualizer .bar {
    background: #1d4d99;
}

.ll-wordset-speaking-stage__audio-button:hover,
.ll-wordset-speaking-stage__audio-button:focus,
.ll-wordset-speaking-stage__audio-button:focus-visible,
.ll-wordset-speaking-stage__audio-button:active,
.ll-wordset-speaking-stage__icon-action:hover,
.ll-wordset-speaking-stage__icon-action:focus,
.ll-wordset-speaking-stage__icon-action:focus-visible,
.ll-wordset-speaking-stage__icon-action:active {
    outline: none;
}

.ll-wordset-speaking-stage__audio-button:hover,
.ll-wordset-speaking-stage__audio-button:focus-visible {
    border-color: rgba(29, 77, 153, 0.28) !important;
    box-shadow: 0 10px 22px rgba(29, 77, 153, 0.14) !important;
}

.ll-wordset-speaking-stage__icon-action:hover,
.ll-wordset-speaking-stage__icon-action:focus-visible {
    transform: translateY(-1px);
}

.ll-wordset-speaking-stage__scoreline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ll-wordset-speaking-stage__bucket,
.ll-wordset-speaking-stage__score {
    color: #7c2d12;
    font-weight: 800;
}

.ll-wordset-speaking-stage__bar-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(124, 45, 18, 0.08);
    overflow: hidden;
}

.ll-wordset-speaking-stage__bar-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #eab308 0%, #f59e0b 50%, #ea580c 100%);
    transition: width 220ms ease;
}

.ll-wordset-speaking-stage__prompt-card[data-speaking-result="right"] ~ .ll-wordset-speaking-stage__result .ll-wordset-speaking-stage__bar-fill,
.ll-wordset-speaking-stage__result .ll-wordset-speaking-stage__bar-fill.is-right {
    background: linear-gradient(90deg, #22c55e 0%, #15803d 100%);
}

.ll-wordset-speaking-stage__prompt-card[data-speaking-result="wrong"] ~ .ll-wordset-speaking-stage__result .ll-wordset-speaking-stage__bar-fill,
.ll-wordset-speaking-stage__result .ll-wordset-speaking-stage__bar-fill.is-wrong {
    background: linear-gradient(90deg, #fb7185 0%, #dc2626 100%);
}

.ll-wordset-speaking-stage__details {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.ll-wordset-speaking-stage__detail {
    display: grid;
    gap: 4px;
}

.ll-wordset-speaking-stage__detail dt {
    color: rgba(124, 45, 18, 0.68);
    font-size: 0.78rem;
    font-weight: 700;
}

.ll-wordset-speaking-stage__detail dd {
    margin: 0;
    color: #431407;
    font-size: 0.94rem;
    font-weight: 700;
}

.ll-wordset-speaking-stage__result-actions {
    align-items: center;
    justify-content: flex-end;
}

.ll-wordset-speaking-stage__icon-action {
    appearance: none;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(29, 77, 153, 0.18);
    box-sizing: border-box;
    border-radius: 14px;
    background: linear-gradient(180deg, #2563eb 0%, #1d4d99 100%) !important;
    background-color: #1d4d99 !important;
    background-image: linear-gradient(180deg, #2563eb 0%, #1d4d99 100%) !important;
    color: #eff6ff !important;
    cursor: pointer;
    box-shadow: 0 14px 24px rgba(29, 77, 153, 0.18);
    -webkit-tap-highlight-color: transparent;
}

.ll-wordset-speaking-stage__icon-action--ghost {
    background: rgba(255, 255, 255, 0.92) !important;
    background-color: rgba(255, 255, 255, 0.92) !important;
    background-image: none !important;
    color: #1d4d99 !important;
    border-color: rgba(29, 77, 153, 0.18) !important;
    box-shadow: none;
}

.ll-wordset-speaking-stage__icon-action-svg {
    width: 24px;
    height: 24px;
    display: block;
    stroke: currentColor !important;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none !important;
}

.ll-wordset-speaking-stage__icon-action-svg path,
.ll-wordset-speaking-stage__icon-action-svg circle,
.ll-wordset-speaking-stage__icon-action-svg line,
.ll-wordset-speaking-stage__icon-action-svg polyline {
    stroke: currentColor !important;
    fill: none !important;
}

@keyframes ll-speaking-record-pulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 24px rgba(231, 76, 60, 0.28);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 14px 28px rgba(220, 38, 38, 0.34);
    }
}

@keyframes ll-speaking-prompt-enter {
    from {
        opacity: 0;
        transform: translate3d(36px, 0, 0) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@media (max-width: 860px) {
    .ll-wordset-games-length {
        align-items: flex-start;
    }

    .ll-wordset-games-length__options {
        width: 100%;
    }

    .ll-wordset-game-card {
        flex-basis: 100%;
        width: 100%;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .ll-wordset-game-card__actions {
        grid-column: 1 / -1;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .ll-wordset-speaking-stage {
        grid-template-columns: 1fr;
        grid-template-areas:
            "topline"
            "prompt"
            "meter"
            "actions"
            "result";
    }

    .ll-wordset-speaking-stage__prompt-shell {
        width: min(100%, 260px);
        justify-self: center;
    }

    .ll-wordset-speaking-stage__topline,
    .ll-wordset-speaking-stage__scoreline {
        flex-direction: column;
        align-items: flex-start;
    }

    .ll-wordset-speaking-stage__comparison {
        grid-template-columns: 1fr;
    }

    .ll-wordset-speaking-stage__details {
        grid-template-columns: 1fr;
    }

    .ll-wordset-speaking-stack-stage__meter {
        width: min(100%, 100%);
    }
}

@media (max-width: 640px) {
    .ll-wordset-game-run-modal {
        --ll-wordset-game-run-pad: 0px;
        padding: 0;
    }

    .ll-wordset-game-run-modal__backdrop {
        backdrop-filter: none;
    }

    .ll-wordset-game-run-modal__dialog {
        width: 100%;
        height: 100dvh;
    }

    .ll-wordset-game-run-modal__dialog .ll-wordset-game-stage {
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
    }

    .ll-wordset-game-card {
        padding: 16px;
        gap: 14px;
    }

    .ll-wordset-games-length {
        padding: 14px;
        gap: 12px;
    }

    .ll-wordset-games-length__options {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .ll-wordset-games-length__option {
        min-width: 0;
        padding: 0 10px;
    }

    .ll-wordset-game-card__icon {
        width: 58px;
        height: 58px;
        border-radius: 18px;
    }

    .ll-wordset-game-stage {
        padding: 12px;
        border-radius: 18px;
        margin-top: 0;
    }

    .ll-wordset-game-stage__hud {
        grid-template-columns: 1fr auto;
        grid-template-areas: "stats actions";
    }

    .ll-wordset-game-stage__hud-actions {
        grid-area: actions;
        justify-self: flex-end;
    }

    .ll-wordset-game-stage__stats {
        grid-area: stats;
        justify-content: flex-start;
    }

    .ll-wordset-game-stage__controls {
        gap: 10px;
    }

    .ll-wordset-game-stage__control {
        min-height: 52px;
    }

    .ll-wordset-game-stage__control-arrow {
        width: 25px;
        height: 25px;
    }

    .ll-wordset-game-stage__control--fire {
        min-height: 58px;
    }

    .ll-wordset-game-stage__control-keycap {
        min-width: 38px;
    }

    .ll-wordset-game-stage__overlay {
        inset: 12px;
        padding: 12px;
    }

    .ll-wordset-game-stage__overlay-card {
        padding: 20px 16px;
    }

    .ll-wordset-speaking-stage {
        gap: 14px;
        padding: 2px;
    }

    .ll-wordset-speaking-stage__prompt-shell {
        width: min(100%, 220px);
    }

    .ll-wordset-speaking-stage__prompt-card {
        min-height: 150px;
        padding: 12px;
    }

    .ll-wordset-speaking-stage__meter {
        gap: 5px;
        padding: 14px 16px;
    }

    .ll-wordset-speaking-stage__action {
        width: 100%;
        justify-content: center;
    }

    .ll-wordset-speaking-stage__action--record {
        width: 52px;
    }

    .ll-wordset-speaking-stage__result {
        padding: 14px;
    }

    .ll-wordset-speaking-stage__result-actions {
        justify-content: space-between;
    }

    .ll-wordset-speaking-stage__comparison-card {
        min-height: 0;
    }

    .ll-wordset-lineup-stage {
        min-height: 0;
        height: 100%;
        padding: 14px;
        gap: 12px;
    }

    .ll-wordset-lineup-stage__card {
        min-width: min(76vw, 260px);
    }

    .ll-wordset-lineup-stage__prompt {
        gap: 10px;
    }

    .ll-wordset-lineup-stage__prompt-image-frame,
    .ll-wordset-lineup-stage__prompt-text-wrap {
        width: 100%;
    }

    .ll-wordset-lineup-stage[data-lineup-mode="unscramble"] {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto auto minmax(0, 1fr);
        grid-template-areas:
            "topline"
            "instruction"
            "prompt"
            "status"
            "cards";
        height: 100%;
    }

    .ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__cards {
        gap: 4px;
    }

    .ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__prompt-image-frame {
        width: min(120px, 34vw, 100%);
    }

    .ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__card--tile {
        min-height: clamp(38px, calc(78px - (var(--ll-unscramble-unit-count, 8) * 2.2px)), 72px);
        max-height: clamp(44px, 11vh, 72px);
        padding: 1px;
    }

    .ll-wordset-lineup-stage[data-lineup-mode="unscramble"] .ll-wordset-lineup-stage__card-text--tile {
        font-size: clamp(0.78rem, calc(1.85rem - (var(--ll-unscramble-unit-count, 8) * 0.08rem)), 1.8rem);
    }

    .ll-wordset-speaking-stack-stage {
        inset: 10px 10px auto;
        gap: 8px;
    }

    .ll-wordset-speaking-stack-stage__progress,
    .ll-wordset-speaking-stack-stage__status,
    .ll-wordset-speaking-stack-stage__heard-row {
        min-height: 34px;
        padding: 7px 12px;
    }

    .ll-wordset-speaking-stack-stage__meter {
        min-height: 40px;
        padding: 10px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ll-wordset-game-card,
    .ll-wordset-game-card__launch,
    .ll-wordset-game-stage__nav,
    .ll-wordset-game-stage__control,
    .ll-wordset-game-stage__overlay-button,
    .ll-wordset-speaking-stage__prompt-card,
    .ll-wordset-speaking-stage__bar-fill,
    .ll-wordset-speaking-stage__meter-bar,
    .ll-wordset-speaking-stack-stage__meter-bar {
        transition: none !important;
        animation: none !important;
    }
}
