.word-clash-shell {
    --wt-red: #e50914;
    --wt-red-bright: #ff3340;
    --wt-ink: #f7f7fb;
    --wt-muted: #a7adbb;
    --wt-panel: #181b24;
    --wt-panel-2: #222632;
    --wt-line: rgba(255, 255, 255, 0.1);
    --daily-leaderboard-height: 502px;
    min-height: 100vh;
}

.word-clash-shell-title .main-title {
    padding-bottom: 10px;
}

.word-clash-shell .page-top {
    padding-bottom: 42px;
}

.word-clash-shell .theme-switcher {
    appearance: none;
    color: inherit;
}

.word-clash-stage {
    box-sizing: border-box;
    min-height: 650px;
    padding: 24px clamp(14px, 3vw, 44px) 56px;
    background:
        radial-gradient(circle at 15% 10%, rgba(229, 9, 20, 0.11), transparent 29%),
        radial-gradient(circle at 85% 20%, rgba(43, 134, 255, 0.1), transparent 26%);
}

.word-clash-game {
    width: min(1240px, 100%);
    margin: 0 auto;
}

.game-toolbar,
.game-footnote,
.drawer-head,
.modal-actions {
    display: flex;
    align-items: center;
}

.game-toolbar {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}

.leaderboard-button,
.how-button,
.primary-button,
.secondary-button,
.close-button,
.inline-retry {
    border: 0;
    font: inherit;
    cursor: pointer;
}

.leaderboard-button,
.how-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--wt-line);
    border-radius: 12px;
    color: var(--wt-ink);
    background: var(--wt-panel-2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    font-weight: 800;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.leaderboard-button:hover,
.how-button:hover {
    transform: translateY(-2px);
    border-color: rgba(229, 9, 20, 0.6);
}

.leaderboard-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 12px;
    font-weight: 800;
}

.leaderboard-symbol {
    position: relative;
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: var(--wt-red-bright);
}

.leaderboard-symbol i {
    position: absolute;
    top: 2px;
    left: 5px;
    width: 10px;
    height: 9px;
    border-radius: 2px 2px 5px 5px;
    background: currentColor;
}

.leaderboard-symbol i::before,
.leaderboard-symbol i::after {
    content: "";
    position: absolute;
    top: 1px;
    width: 4px;
    height: 5px;
    border: 2px solid currentColor;
}

.leaderboard-symbol i::before {
    right: 8px;
    border-right: 0;
    border-radius: 4px 0 0 5px;
}

.leaderboard-symbol i::after {
    left: 8px;
    border-left: 0;
    border-radius: 0 4px 5px 0;
}

.leaderboard-symbol::before,
.leaderboard-symbol::after {
    content: "";
    position: absolute;
    left: 50%;
    background: currentColor;
    transform: translateX(-50%);
}

.leaderboard-symbol::before {
    top: 10px;
    width: 3px;
    height: 5px;
}

.leaderboard-symbol::after {
    bottom: 2px;
    width: 11px;
    height: 3px;
    border-radius: 3px;
}

.how-symbol {
    display: inline-grid;
    place-items: center;
    width: 21px;
    height: 21px;
    color: var(--wt-red-bright);
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 950;
    line-height: 1;
}

.prompt-block {
    margin: 0 auto 24px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 7px;
    color: var(--wt-red-bright);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.19em;
}

.prompt-block h2,
.modal-card h2,
.drawer-head h2 {
    margin: 0;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.prompt-block h2 {
    font-size: clamp(1.6rem, 3.2vw, 2.7rem);
}

.round-status {
    margin: 10px 0 0;
    color: var(--wt-muted);
    font-size: 0.96rem;
}

.round-status:empty {
    display: none;
}

.word-arena {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: min(1120px, 100%);
    height: 410px;
    min-height: 0;
    margin: 0 auto;
    border: 1px solid var(--wt-line);
    border-radius: 28px;
    overflow: hidden;
    background: #0e1016;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
    isolation: isolate;
}

.word-card {
    --card-glow: 229, 9, 20;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    min-height: 0;
    padding: 48px 38px 40px;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle at 50% 38%, rgba(var(--card-glow), 0.3), transparent 38%),
        linear-gradient(135deg, #20242e 0%, #11131a 78%);
    cursor: pointer;
    overflow: hidden;
    contain: layout paint;
    transition: filter 250ms ease, transform 300ms ease, background 300ms ease;
}

.word-card-right {
    --card-glow: 51, 124, 255;
    border-left: 1px solid var(--wt-line);
    background:
        radial-gradient(circle at 50% 38%, rgba(var(--card-glow), 0.28), transparent 38%),
        linear-gradient(225deg, #20242e 0%, #11131a 78%);
}

.word-card:not(:disabled):hover,
.word-card:not(:disabled):focus-visible {
    z-index: 2;
    filter: brightness(1.16);
    outline: none;
}

.word-card:not(:disabled):hover .word-text,
.word-card:not(:disabled):focus-visible .word-text {
    transform: translateY(-4px) scale(1.035);
}

.word-card:not(:disabled):focus-visible {
    box-shadow: inset 0 0 0 4px #fff;
}

.card-wash {
    position: absolute;
    right: -0.03em;
    bottom: -0.27em;
    color: rgba(255, 255, 255, 0.025);
    font-size: clamp(13rem, 27vw, 25rem);
    font-weight: 1000;
    line-height: 1;
    pointer-events: none;
}

.word-kicker {
    position: relative;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.word-text {
    position: relative;
    display: block;
    max-width: 100%;
    font-size: clamp(2.65rem, 7vw, 5.9rem);
    font-weight: 950;
    line-height: 1;
    letter-spacing: -0.065em;
    overflow-wrap: normal;
    white-space: nowrap;
    text-transform: lowercase;
    text-shadow: 0 6px 30px rgba(var(--card-glow), 0.34);
    transition: transform 250ms ease;
}

.frequency-wrap {
    position: relative;
    display: grid;
    justify-items: center;
    min-height: 58px;
    margin-top: 7px;
}

.frequency-unit {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.72rem;
    font-weight: 700;
}

.frequency-value {
    min-width: 120px;
    font-variant-numeric: tabular-nums;
    font-size: clamp(2rem, 4vw, 3.3rem);
    font-weight: 900;
    line-height: 1.05;
    filter: blur(8px);
    opacity: 0.15;
    transform: scale(0.8);
    transition: filter 450ms ease, opacity 450ms ease, transform 500ms cubic-bezier(.18, .89, .32, 1.28);
}

.frequency-unit {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 350ms ease, transform 350ms ease;
}

.result-mark {
    position: absolute;
    top: 24px;
    right: 24px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    box-sizing: border-box;
    border: 2px solid currentColor;
    border-radius: 50%;
    contain: layout style;
    opacity: 0;
    transform: scale(0) rotate(-25deg);
}

.result-mark::before,
.result-mark::after {
    content: "";
    position: absolute;
    box-sizing: border-box;
}

.result-mark.is-check::before {
    top: 20%;
    left: 38%;
    width: 24%;
    height: 48%;
    border-right: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    transform: rotate(45deg);
}

.result-mark.is-down::before {
    top: 19%;
    left: 50%;
    width: 3px;
    height: 48%;
    border-radius: 3px;
    background: currentColor;
    transform: translateX(-50%);
}

.result-mark.is-down::after {
    left: 36%;
    bottom: 21%;
    width: 28%;
    height: 28%;
    border-right: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    transform: rotate(45deg);
}

.result-mark.is-cross::before,
.result-mark.is-cross::after {
    top: 50%;
    left: 50%;
    width: 52%;
    height: 3px;
    border-radius: 3px;
    background: currentColor;
}

.result-mark.is-cross::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.result-mark.is-cross::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.result-mark.is-tie::before,
.result-mark.is-tie::after {
    left: 27%;
    width: 46%;
    height: 3px;
    border-radius: 3px;
    background: currentColor;
}

.result-mark.is-tie::before {
    top: 38%;
}

.result-mark.is-tie::after {
    bottom: 38%;
}

.versus {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 7px solid #0e1016;
    border-radius: 50%;
    color: #17191f;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
    font-size: 0.95rem;
    font-weight: 1000;
    transform: translate(-50%, -50%);
}

.word-arena.is-revealed .frequency-value,
.word-card.is-revealed .frequency-value {
    filter: blur(0);
    opacity: 1;
    transform: scale(1);
}

.word-arena.is-revealed .frequency-unit,
.word-card.is-revealed .frequency-unit {
    opacity: 1;
    transform: translateY(0);
}

.word-arena.is-revealed .result-mark {
    animation: mark-arrive 520ms cubic-bezier(.18, .89, .32, 1.45) 320ms both;
}

.word-card.is-correct {
    color: #fff;
    background:
        radial-gradient(circle at 50% 38%, rgba(35, 210, 120, 0.42), transparent 42%),
        linear-gradient(145deg, #153a2b, #101a16 78%);
}

.word-card.is-correct .result-mark {
    color: #68f0ad;
}

.word-card.is-wrong {
    background:
        radial-gradient(circle at 50% 38%, rgba(229, 9, 20, 0.5), transparent 42%),
        linear-gradient(145deg, #45161b, #1c1113 78%);
    animation: card-shake 480ms ease 250ms both;
}

.word-card.is-wrong .result-mark {
    color: #ff7b83;
}

.word-card.is-tie {
    color: #fff;
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 161, 45, 0.5), transparent 42%),
        linear-gradient(145deg, #57330f, #21170e 78%);
}

.word-card.is-tie .result-mark {
    color: #ffb554;
}

.word-card.is-lower {
    filter: saturate(0.35) brightness(0.72);
}

.word-arena.is-loading .word-card {
    cursor: wait;
}

.word-arena.is-loading .word-text,
.word-arena.is-loading .word-kicker,
.word-arena.is-loading .frequency-wrap {
    color: transparent;
    background: linear-gradient(100deg, rgba(255,255,255,.05) 30%, rgba(255,255,255,.14) 50%, rgba(255,255,255,.05) 70%);
    background-size: 240% 100%;
    border-color: transparent;
    border-radius: 9px;
    text-shadow: none;
    animation: loading-sheen 1.4s linear infinite;
}

.word-arena.is-loading .word-text {
    width: 58%;
}

.word-arena.is-entering .word-card-left {
    animation: card-enter-left 560ms cubic-bezier(.16, 1, .3, 1) both;
}

.word-arena.is-entering .word-card-right {
    animation: card-enter-right 560ms cubic-bezier(.16, 1, .3, 1) both;
}

.word-arena.is-exiting .word-card-left {
    animation: card-exit-left 380ms ease both;
}

.word-arena.is-exiting .word-card-right {
    animation: card-exit-right 380ms ease both;
}

.word-card-left.is-card-exiting {
    animation: card-exit-left 380ms ease both;
}

.word-card-right.is-card-exiting {
    animation: card-exit-right 380ms ease both;
}

.word-card-left.is-card-entering {
    animation: card-enter-left 560ms cubic-bezier(.16, 1, .3, 1) both;
}

.word-card-right.is-card-entering {
    animation: card-enter-right 560ms cubic-bezier(.16, 1, .3, 1) both;
}

.board-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: max-content;
    min-width: 112px;
    margin: 15px auto 0;
    padding: 9px 17px;
    border: 1px solid var(--wt-line);
    border-radius: 14px;
    color: var(--wt-ink);
    background: var(--wt-panel-2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.14);
}

.board-score span {
    color: var(--wt-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
}

.board-score strong {
    min-width: 1ch;
    font-size: 1.55rem;
    line-height: 1;
    text-align: center;
}

.board-play-again {
    display: block;
    min-width: 150px;
    margin: 10px auto 0;
    animation: board-restart-in 480ms cubic-bezier(.18, .89, .32, 1.28) both;
}

.board-play-again[hidden] {
    display: none;
}

.game-footnote {
    justify-content: center;
    gap: 20px;
    width: min(1080px, calc(100% - 28px));
    margin: 12px auto 0;
    color: var(--wt-muted);
    font-size: 0.75rem;
}

.game-footnote a,
.inline-retry {
    color: var(--wt-red-bright);
}

kbd {
    padding: 2px 6px;
    border: 1px solid var(--wt-line);
    border-bottom-width: 2px;
    border-radius: 5px;
    color: var(--wt-ink);
    background: var(--wt-panel-2);
    font-family: inherit;
}

.inline-retry {
    padding: 0;
    background: transparent;
    font-weight: 800;
    text-decoration: underline;
}

.panel-scrim {
    position: fixed;
    z-index: 80;
    inset: 0;
    background: rgba(3, 5, 9, 0.72);
    backdrop-filter: blur(5px);
    animation: scrim-in 220ms ease both;
}

.leaderboard-drawer {
    position: fixed;
    z-index: 90;
    top: 50%;
    right: 12px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 340px;
    max-width: calc(100vw - 24px);
    height: min(502px, calc(100dvh - 24px));
    padding: 20px 18px 16px;
    border: 1px solid var(--wt-line);
    border-radius: 18px;
    color: var(--wt-ink);
    background: #171a22;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    transform: translate(calc(100% + 32px), -50%);
    transition: transform 0.5s ease-in-out;
}

.leaderboard-drawer.is-open {
    transform: translate(0, -50%);
}

.drawer-head {
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--wt-line);
}

.drawer-head h2 {
    font-size: 1.55rem;
}

.close-button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--wt-ink);
    background: rgba(255, 255, 255, 0.07);
    font-size: 1.7rem;
    line-height: 1;
    transition: background 180ms ease, transform 180ms ease;
}

.close-button:hover {
    background: rgba(229, 9, 20, 0.22);
    transform: rotate(6deg);
}

.leaderboard-list {
    display: grid;
    grid-template-rows: repeat(10, minmax(0, 1fr));
    flex: 1 1 auto;
    min-height: 0;
    gap: 0;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 30px 24px 1fr auto;
    align-items: center;
    min-height: 0;
    padding: 0 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
    font-variant-numeric: tabular-nums;
}

.leaderboard-row.is-placeholder {
    opacity: 1;
}

body:not(.light-mode) .leaderboard-row.is-placeholder > :not(.rank) {
    opacity: 0.35;
}

.player-flag {
    display: block;
    width: 24px;
}

.country-flag {
    display: inline-block;
    width: 20px;
    height: auto;
    margin-left: 4px;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.flag-placeholder {
    font-size: 1rem;
}

.player-name {
    padding-left: 9px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.12em;
}

.leader-score {
    font-size: 1.05rem;
    font-weight: 900;
}

@media (max-width: 767px) {
    .leaderboard-drawer {
        top: 50%;
        right: auto;
        left: 50%;
        width: min(360px, calc(100vw - 28px));
        max-width: none;
        height: auto;
        max-height: calc(100dvh - 32px);
        padding: 18px 16px 14px;
        border-radius: 20px;
        box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
        opacity: 0;
        pointer-events: none;
        transform: translate(-50%, -46%) scale(0.94);
        transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    }

    .leaderboard-drawer.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, -50%) scale(1);
    }

    .leaderboard-list {
        flex: none;
        height: min(410px, calc(100dvh - 142px));
        min-height: 0;
    }

    .leaderboard-row {
        grid-template-columns: 28px 24px 1fr auto;
        padding-inline: 4px;
    }
}

.game-modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

#name-modal {
    padding-bottom: 220px;
}

.game-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.game-modal[hidden] {
    display: none;
}

.modal-card {
    position: relative;
    box-sizing: border-box;
    width: min(430px, 100%);
    padding: 34px;
    border: 1px solid var(--wt-line);
    border-radius: 24px;
    color: var(--wt-ink);
    background: #1c1f29;
    box-shadow: 0 35px 100px rgba(0, 0, 0, 0.5);
    text-align: center;
    transform: translateY(20px) scale(0.96);
    transition: transform 420ms cubic-bezier(.16, 1, .3, 1);
}

#name-modal .name-card {
    max-height: calc(100dvh - 236px);
    overflow-y: auto;
}

.word-clash-name-keyboard {
    position: fixed;
    z-index: 1;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
}

.game-modal.is-open .modal-card {
    transform: translateY(0) scale(1);
}

.modal-card h2 {
    font-size: clamp(1.75rem, 5vw, 2.35rem);
}

.modal-card > p:not(.eyebrow):not(.final-score-label) {
    color: var(--wt-muted);
    line-height: 1.55;
}

.modal-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: 20px;
    background: rgba(229, 9, 20, 0.12);
    font-size: 1.8rem;
    transform: rotate(-5deg);
}

.initial-boxes {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 9px;
    width: max-content;
    margin: 24px auto 14px;
    cursor: text;
}

.initial-boxes span {
    display: grid;
    place-items: center;
    width: 60px;
    height: 66px;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-radius: 13px;
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    font-size: 2rem;
    font-weight: 950;
    text-transform: uppercase;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.initial-boxes span.has-letter {
    border-color: var(--wt-red);
    background: var(--wt-red);
    transform: translateY(-3px);
    animation: initial-pop 280ms cubic-bezier(.18, .89, .32, 1.28) both;
}

.initial-boxes input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    opacity: 0.01;
    cursor: text;
    font-size: 16px;
}

.form-message {
    min-height: 1.4em;
    margin: 0 0 8px;
    color: #ff858c !important;
    font-size: 0.78rem;
}

.form-message.is-info {
    color: #68dca5 !important;
}

.primary-button,
.secondary-button {
    min-height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 900;
    transition: transform 180ms ease, filter 180ms ease;
}

.primary-button {
    color: #fff;
    background: var(--wt-red);
    box-shadow: 0 10px 28px rgba(229, 9, 20, 0.25);
}

.secondary-button {
    border: 1px solid var(--wt-line);
    color: var(--wt-ink);
    background: rgba(255, 255, 255, 0.06);
}

.primary-button:hover:not(:disabled),
.secondary-button:hover {
    filter: brightness(1.12);
    transform: translateY(-2px);
}

.primary-button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.5);
    opacity: 0.45;
}

.name-card .primary-button,
.how-card .primary-button {
    width: 100%;
}

.final-score-label {
    margin: 24px 0 0;
    color: var(--wt-muted);
    font-size: 0.73rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.final-score {
    display: block;
    margin: 2px 0 25px;
    color: var(--wt-red-bright);
    font-size: 4.5rem;
    line-height: 1;
}

.modal-actions {
    justify-content: center;
    gap: 10px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
}

.how-card {
    width: min(520px, 100%);
    text-align: left;
}

.how-card .eyebrow,
.how-card h2 {
    padding-right: 35px;
}

.how-list {
    display: grid;
    gap: 14px;
    margin: 24px 0;
    padding: 0;
    list-style: none;
}

.how-list li {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 12px;
}

.how-list li > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #fff;
    background: var(--wt-red);
    font-weight: 950;
}

.how-list p {
    margin: 0;
    color: var(--wt-muted);
    line-height: 1.45;
}

.word-clash-shell .footer span:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

body.light-mode.word-clash-shell {
    --wt-ink: #1a1c23;
    --wt-muted: #666d7c;
    --wt-panel: #fff;
    --wt-panel-2: #f2f3f6;
    --wt-line: rgba(20, 24, 34, 0.13);
}

body.light-mode .word-clash-stage {
    background:
        radial-gradient(circle at 15% 10%, rgba(229, 9, 20, 0.08), transparent 29%),
        radial-gradient(circle at 85% 20%, rgba(43, 134, 255, 0.08), transparent 26%),
        #f7f7f9;
}

body.light-mode .leaderboard-button,
body.light-mode .how-button,
body.light-mode .board-score {
    color: var(--wt-ink);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 10px 25px rgba(28, 32, 43, 0.08);
}

body.light-mode .word-arena {
    border-color: rgba(20, 24, 34, 0.12);
    background: #f0f1f5;
    box-shadow: 0 28px 70px rgba(34, 39, 52, 0.16);
}

body.light-mode .word-card {
    color: #20232c;
    background:
        radial-gradient(circle at 50% 38%, rgba(229, 9, 20, 0.18), transparent 39%),
        linear-gradient(135deg, #ffffff 0%, #f3f1f2 80%);
}

body.light-mode .word-card-right {
    border-left-color: rgba(20, 24, 34, 0.11);
    background:
        radial-gradient(circle at 50% 38%, rgba(51, 124, 255, 0.18), transparent 39%),
        linear-gradient(225deg, #ffffff 0%, #f0f3f8 80%);
}

body.light-mode .word-card:not(:disabled):hover,
body.light-mode .word-card:not(:disabled):focus-visible {
    filter: brightness(1.02) saturate(1.08);
}

body.light-mode .word-card:not(:disabled):focus-visible {
    box-shadow: inset 0 0 0 4px #252935;
}

body.light-mode .card-wash {
    color: rgba(22, 26, 36, 0.035);
}

body.light-mode .word-kicker {
    border-color: rgba(20, 24, 34, 0.16);
    color: rgba(20, 24, 34, 0.64);
    background: rgba(255, 255, 255, 0.46);
}

body.light-mode .word-text {
    text-shadow: 0 7px 27px rgba(var(--card-glow), 0.2);
}

body.light-mode .frequency-unit {
    color: rgba(24, 28, 38, 0.62);
}

body.light-mode .versus {
    border-color: #f0f1f5;
    color: #fff;
    background: #20232c;
    box-shadow: 0 10px 26px rgba(31, 35, 46, 0.18);
}

body.light-mode .word-card.is-correct {
    color: #153528;
    background:
        radial-gradient(circle at 50% 38%, rgba(35, 210, 120, 0.27), transparent 42%),
        linear-gradient(145deg, #edfff6, #dff5e9 78%);
}

body.light-mode .word-card.is-wrong {
    color: #49171b;
    background:
        radial-gradient(circle at 50% 38%, rgba(229, 9, 20, 0.24), transparent 42%),
        linear-gradient(145deg, #fff0f1, #f7dfe1 78%);
}

body.light-mode .word-card.is-tie {
    color: #4a2a08;
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 161, 45, 0.28), transparent 42%),
        linear-gradient(145deg, #fff4df, #f8dfb5 78%);
}

body.light-mode .word-card.is-lower {
    filter: saturate(0.45) brightness(0.95);
}

body.light-mode .word-arena.is-loading .word-text,
body.light-mode .word-arena.is-loading .word-kicker,
body.light-mode .word-arena.is-loading .frequency-wrap {
    background: linear-gradient(100deg, rgba(25, 30, 42, .05) 30%, rgba(25, 30, 42, .12) 50%, rgba(25, 30, 42, .05) 70%);
    background-size: 240% 100%;
}

body.light-mode .leaderboard-drawer,
body.light-mode .modal-card {
    color: var(--wt-ink);
    background: #fff;
}

body.light-mode .leaderboard-row {
    color: #20242e;
    border-bottom-color: rgba(20, 24, 34, 0.13);
}

body.light-mode .leaderboard-row .player-name,
body.light-mode .leaderboard-row .leader-score {
    color: #20242e;
}

body.light-mode .leaderboard-row.is-placeholder {
    opacity: 1;
}

body.light-mode .leaderboard-row.is-placeholder .player-name,
body.light-mode .leaderboard-row.is-placeholder .leader-score,
body.light-mode .leaderboard-row.is-placeholder .flag-placeholder {
    color: #858c98;
}

body.light-mode .leaderboard-list {
    scrollbar-color: #858c98 #edf0f3;
}

body.light-mode .leaderboard-list::-webkit-scrollbar-track {
    background: #edf0f3;
}

body.light-mode .leaderboard-list::-webkit-scrollbar-thumb {
    border: 3px solid #edf0f3;
    border-radius: 999px;
    background: #858c98;
}

body.light-mode .close-button,
body.light-mode .secondary-button {
    color: var(--wt-ink);
    background: #f2f3f6;
}

body.light-mode .initial-boxes span {
    color: var(--wt-ink);
    border-color: rgba(20, 24, 34, 0.2);
    background: #f5f5f7;
}

body.light-mode .initial-boxes span.has-letter {
    color: #fff;
    border-color: var(--wt-red);
    background: var(--wt-red);
}

body.light-mode kbd {
    color: var(--wt-ink);
    background: #fff;
}

@keyframes mark-arrive {
    from { opacity: 0; transform: scale(0) rotate(-25deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes card-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    55% { transform: translateX(7px); }
    75% { transform: translateX(-3px); }
}

@keyframes loading-sheen {
    to { background-position: -240% 0; }
}

@keyframes card-enter-left {
    from { opacity: 0; transform: translateX(-70px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes card-enter-right {
    from { opacity: 0; transform: translateX(70px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes card-exit-left {
    to { opacity: 0; transform: translateX(-80px) scale(0.96); }
}

@keyframes card-exit-right {
    to { opacity: 0; transform: translateX(80px) scale(0.96); }
}

@keyframes score-burst {
    45% { color: #61eaa9; transform: scale(1.65) rotate(-5deg); }
}

@keyframes initial-pop {
    50% { transform: translateY(-6px) scale(1.08); }
}

@keyframes board-restart-in {
    from { opacity: 0; transform: translateY(12px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes scrim-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.score-pop {
    animation: score-burst 520ms cubic-bezier(.18, .89, .32, 1.28);
}

@media (max-width: 720px) {
    #name-modal {
        padding-bottom: 188px;
    }

    #name-modal .name-card {
        max-height: calc(100dvh - 204px);
    }

    .word-clash-name-keyboard {
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        transform: none;
    }

    .word-clash-shell .page-top {
        padding-bottom: 28px;
    }

    .word-clash-shell-title .main-title {
        font-size: 2rem;
    }

    .word-clash-stage {
        padding: 16px 10px 40px;
    }

    .game-toolbar {
        margin-bottom: 21px;
    }

    .how-button {
        width: 44px;
        padding: 0;
        border-radius: 50%;
    }

    .how-label {
        display: none;
    }

    .how-symbol {
        width: 20px;
        height: 20px;
        border: 0;
        font-size: 1.05rem;
        transform: translateY(-1px);
    }

    .leaderboard-button {
        width: 44px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .leaderboard-label {
        display: none;
    }

    .leaderboard-symbol {
        flex-basis: 20px;
    }

    .prompt-block {
        margin-bottom: 16px;
        padding: 0 8px;
    }

    .round-status {
        font-size: 0.84rem;
    }

    .word-arena {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, minmax(0, 1fr));
        height: 630px;
        min-height: 0;
        border-radius: 22px;
    }

    .word-card {
        min-height: 0;
        padding: 35px 24px 30px;
    }

    .word-card-right {
        border-top: 1px solid var(--wt-line);
        border-left: 0;
    }

    body.light-mode .word-card-right {
        border-top-color: rgba(20, 24, 34, 0.11);
    }

    .word-text {
        font-size: clamp(2.55rem, 13vw, 4.6rem);
    }

    .frequency-wrap {
        min-height: 68px;
        margin-top: 1px;
    }

    .frequency-value {
        font-size: 2rem;
    }

    .result-mark {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    .versus {
        width: 55px;
        height: 55px;
        border-width: 6px;
    }

    .game-footnote {
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .modal-card {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .initial-boxes span {
        width: 56px;
        height: 62px;
    }
}

@media (max-width: 390px) {
    .word-arena {
        height: 570px;
        min-height: 0;
    }

    .word-card {
        min-height: 0;
        padding-top: 30px;
        padding-bottom: 26px;
    }

    .word-text {
        font-size: 2.55rem;
    }

    .word-kicker {
        font-size: 0.6rem;
    }

    .frequency-unit {
        font-size: 0.63rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .word-clash-shell *,
    .word-clash-shell *::before,
    .word-clash-shell *::after {
        animation-duration: 1ms !important;
        animation-delay: 0ms !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}
