.lwl-modal-open {
    overflow: hidden !important;
}

body.lwl-modal-open {
    overflow: hidden !important;
    touch-action: none;
}

.lwl-lexicongrove-card {
    position: relative;
    width: 100%;
    min-height: 180px;
    border: 1px solid var(--campfire-line);
    border-radius: 18px;
    padding: 18px;
    overflow: hidden;
    isolation: isolate;
    text-align: left;
    cursor: pointer;
    color: var(--campfire-ink);
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lwl-lexicongrove-card__bg,
.lwl-lexicongrove-card__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lwl-lexicongrove-card__bg {
    background-image: var(--lwl-lexi-card-bg, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.03);
}

.lwl-lexicongrove-card__overlay {
    background:
        linear-gradient(180deg, rgba(10, 12, 16, 0.5), rgba(7, 9, 13, 0.72)),
        radial-gradient(60% 80% at 18% 20%, rgba(255, 176, 103, 0.16), rgba(7, 9, 13, 0.05));
}

.lwl-lexicongrove-card__content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
}

.lwl-lexicongrove-card .lwl-campfire__panel-title {
    margin-bottom: 0;
}

.lwl-lexicongrove-card__title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}

.lwl-lexicongrove-card__sub {
    display: block;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(231, 226, 217, 0.84);
}

.lwl-lexicongrove-card__chevron {
    font-size: 24px;
    line-height: 1;
    color: rgba(255, 210, 152, 0.9);
    text-shadow: 0 0 14px rgba(255, 170, 98, 0.4);
}

.lwl-lexicongrove-card:hover,
.lwl-lexicongrove-card:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08), 0 0 20px rgba(255, 122, 58, 0.28);
    outline: none;
}

.lwl-lexicongrove-card:active {
    transform: translateY(1px);
}

.lwl-lexicongrove {
    position: relative;
    min-height: clamp(500px, 74vh, 860px);
    border-radius: 20px;
    overflow: hidden;
    isolation: isolate;
    background: #0b0e14;
}

.lwl-lexicongrove__bg,
.lwl-lexicongrove__veil {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lwl-lexicongrove__bg {
    background-image: var(--lwl-grove-bg, linear-gradient(180deg, #0f1320, #0b0e14));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.03);
}

.lwl-lexicongrove__veil {
    background:
        radial-gradient(60% 58% at 50% 52%, rgba(255, 166, 84, 0.08), rgba(6, 8, 12, 0.42)),
        linear-gradient(180deg, rgba(10, 12, 16, 0.32), rgba(7, 8, 12, 0.66));
}

.lwl-lexicongrove__layout {
    position: relative;
    z-index: 1;
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(22px, 4.2vw, 58px) clamp(18px, 3vw, 34px) clamp(22px, 4.2vw, 58px);
}

.lwl-grove-gamebar {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    gap: clamp(12px, 2.4vw, 28px);
}

.lwl-lexicongrove__icon {
    position: relative;
    border: 0;
    background: transparent;
    background-image: none;
    cursor: pointer;
}

.lwl-grove-game {
    --accent-1: #7f8cff;
    --accent-2: #5f7ee9;
    --glass-a: rgba(10, 56, 52, 0.9);
    --glass-b: rgba(7, 38, 39, 0.88);
    --glow-rgb: 138, 162, 255;
    --label-text: #f2fffb;
    width: 100%;
    max-width: 340px;
    justify-self: center;
    border: 0;
    background: transparent;
    background-image: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transform: translate3d(0, 0, 0) scale(1);
    transition: transform 0.24s ease, filter 0.24s ease;
}

.lwl-grove-game--twilight {
    --accent-1: #8b8fff;
    --accent-2: #5b79ec;
    --glow-rgb: 136, 160, 255;
}

.lwl-grove-game--runic {
    --accent-1: #e2bc6a;
    --accent-2: #c79339;
    --glow-rgb: 225, 183, 95;
}

.lwl-grove-game--owmw {
    --accent-1: #52c6a6;
    --accent-2: #28a894;
    --glow-rgb: 76, 193, 157;
}

.lwl-grove-game--moonlight {
    --accent-1: #cfd9ff;
    --accent-2: #6e88d8;
    --glass-a: rgba(19, 32, 66, 0.92);
    --glass-b: rgba(10, 18, 40, 0.9);
    --glow-rgb: 181, 201, 255;
    --label-text: #f4f8ff;
}

.lwl-grove-game__icon {
    position: relative;
    display: block;
    width: min(300px, 100%);
    border-radius: 16px;
    overflow: visible;
}

.lwl-grove-game__icon img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    filter:
        drop-shadow(0 12px 28px rgba(0, 0, 0, 0.46))
        drop-shadow(0 0 10px rgba(255, 198, 120, 0.24));
    transition: filter 0.25s ease;
}

.lwl-grove-game__placard {
    position: relative;
    width: min(280px, 92%);
    padding: 9px 14px 10px;
    border-radius: 12px;
    border: 1px solid rgba(var(--glow-rgb), 0.44);
    background:
        radial-gradient(130% 95% at 50% 0%, rgba(221, 255, 246, 0.26), transparent 62%),
        radial-gradient(120% 100% at 100% 0, rgba(var(--glow-rgb), 0.2), transparent 60%),
        linear-gradient(165deg, var(--glass-a), var(--glass-b));
    box-shadow:
        inset 0 1px 0 rgba(235, 255, 249, 0.28),
        0 8px 18px rgba(0, 0, 0, 0.28),
        0 0 0 rgba(var(--glow-rgb), 0);
    color: var(--label-text);
    font-size: clamp(11px, 1vw, 13px);
    font-weight: 700;
    letter-spacing: 0.045em;
    line-height: 1.2;
    text-transform: uppercase;
    text-align: center;
    overflow: hidden;
}

.lwl-grove-game__placard-lines {
    position: relative;
    z-index: 1;
    display: block;
}

.lwl-grove-game__placard::before,
.lwl-grove-game__placard::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.lwl-grove-game__placard::before {
    inset: 0;
    background: linear-gradient(180deg, rgba(230, 255, 248, 0.22), transparent 52%);
}

.lwl-grove-game__placard::after {
    top: -20%;
    bottom: -20%;
    width: 36%;
    left: -42%;
    background: linear-gradient(110deg, transparent 12%, rgba(255, 255, 255, 0.48) 50%, transparent 88%);
    transform: skewX(-18deg);
    opacity: 0;
}

.lwl-lexicongrove__rh-modal {
    position: absolute;
    inset: 0;
    z-index: 13;
    display: grid;
    place-items: center;
}

.lwl-lexicongrove__rh-modal[hidden] {
    display: none;
}

.lwl-lexicongrove__rh-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(34, 24, 10, 0.56);
    backdrop-filter: blur(4px);
}

.lwl-grove-gameframe {
    --lwl-grove-frame-width: min(1040px, 94vw);
    --lwl-grove-frame-height: min(760px, 88vh);
    width: var(--lwl-grove-frame-width);
    height: var(--lwl-grove-frame-height);
    max-width: var(--lwl-grove-frame-width);
    max-height: 88vh;
    border-radius: 20px;
    overflow: hidden;
}

.lwl-lexicongrove__rh-panel {
    position: relative;
    width: var(--lwl-grove-frame-width, min(980px, 92vw));
    height: var(--lwl-grove-frame-height, min(700px, 86vh));
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    border: 1px solid rgba(194, 153, 65, 0.35);
    background:
        radial-gradient(95% 120% at 70% 0%, rgba(232, 194, 112, 0.24), transparent 55%),
        radial-gradient(120% 120% at 8% 92%, rgba(255, 244, 216, 0.24), transparent 60%),
        linear-gradient(180deg, rgba(255, 251, 241, 0.96), rgba(245, 235, 212, 0.98));
    box-shadow: 0 24px 54px rgba(44, 30, 9, 0.34), 0 0 28px rgba(206, 166, 80, 0.24);
    color: #2f271d;
    animation: lwl-lexi-modal-in 0.28s ease-out;
}

.lwl-grove-gameframe--runic {
    --lwl-grove-frame-width: min(1040px, 94vw);
    --lwl-grove-frame-height: min(760px, 88vh);
}

.lwl-grove-gameframe--twilight {
    --lwl-grove-frame-width: min(1040px, 94vw);
    --lwl-grove-frame-height: min(760px, 88vh);
}

.lwl-grove-gameframe--owmw {
    --lwl-grove-frame-width: min(1040px, 94vw);
    --lwl-grove-frame-height: min(760px, 88vh);
    border-color: rgba(70, 185, 164, 0.34);
    background:
        radial-gradient(95% 120% at 70% 0%, rgba(58, 190, 165, 0.22), transparent 55%),
        radial-gradient(120% 120% at 8% 92%, rgba(114, 220, 188, 0.18), transparent 60%),
        linear-gradient(180deg, rgba(8, 27, 30, 0.98), rgba(6, 21, 25, 0.98));
    box-shadow: 0 24px 54px rgba(3, 13, 14, 0.52), 0 0 28px rgba(67, 189, 165, 0.2);
    color: rgba(244, 255, 252, 0.96);
}

.lwl-grove-gameframe--moonlight {
    --lwl-grove-frame-width: min(1220px, 96vw);
    --lwl-grove-frame-height: min(900px, 92vh);
    border-color: rgba(146, 175, 255, 0.3);
    background:
        radial-gradient(95% 120% at 70% 0%, rgba(169, 190, 255, 0.18), transparent 55%),
        radial-gradient(120% 120% at 10% 100%, rgba(133, 229, 232, 0.08), transparent 56%),
        linear-gradient(180deg, rgba(7, 16, 38, 0.98), rgba(10, 22, 51, 0.98));
    box-shadow: 0 28px 62px rgba(2, 8, 24, 0.58), 0 0 30px rgba(139, 169, 247, 0.18);
    color: rgba(244, 248, 255, 0.97);
}

.lwl-lexicongrove__rh-panel::before,
.lwl-lexicongrove__rh-panel::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.lwl-lexicongrove__rh-panel::before {
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.18) 0 1px, transparent 2px) 0 0 / 180px 180px,
        radial-gradient(circle at 80% 72%, rgba(212, 170, 84, 0.16) 0 1px, transparent 2px) 0 0 / 220px 220px;
    opacity: 0.4;
    animation: lwl-lexi-rh-drift 18s linear infinite;
}

.lwl-lexicongrove__rh-panel::after {
    inset: 1px;
    border-radius: 19px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.lwl-grove-gameframe--owmw::before {
    background:
        radial-gradient(circle at 20% 20%, rgba(113, 233, 208, 0.16) 0 1px, transparent 2px) 0 0 / 180px 180px,
        radial-gradient(circle at 80% 72%, rgba(58, 178, 154, 0.16) 0 1px, transparent 2px) 0 0 / 220px 220px;
    opacity: 0.5;
}

.lwl-grove-gameframe--moonlight::before {
    background:
        radial-gradient(circle at 18% 18%, rgba(234, 240, 255, 0.16) 0 1px, transparent 2px) 0 0 / 180px 180px,
        radial-gradient(circle at 84% 70%, rgba(151, 176, 255, 0.18) 0 1px, transparent 2px) 0 0 / 220px 220px;
    opacity: 0.56;
}

.lwl-grove-gameframe--owmw::after {
    border-color: rgba(208, 248, 239, 0.2);
    box-shadow: inset 0 1px 0 rgba(240, 255, 250, 0.26);
}

.lwl-grove-gameframe--moonlight::after {
    border-color: rgba(232, 239, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(238, 245, 255, 0.18);
}

.lwl-lexicongrove__rh-header {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
    padding: 14px 18px 0;
}

.lwl-lexicongrove__rh-title-wrap {
    grid-column: 2;
    justify-self: center;
    position: relative;
    width: min(520px, 100%);
    margin: 0 auto;
    padding: clamp(8px, 1.3vw, 12px) clamp(18px, 2.4vw, 30px);
    border-radius: 16px;
    border: 1px solid rgba(189, 147, 62, 0.4);
    background:
        radial-gradient(120% 130% at 22% 18%, rgba(242, 213, 151, 0.38), transparent 56%),
        radial-gradient(130% 120% at 84% 78%, rgba(251, 240, 216, 0.52), transparent 64%),
        linear-gradient(150deg, rgba(255, 253, 248, 0.96), rgba(248, 240, 226, 0.94) 42%, rgba(242, 231, 209, 0.96));
    box-shadow:
        0 10px 30px rgba(90, 64, 19, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.58),
        inset 0 0 34px rgba(220, 177, 91, 0.14);
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    backdrop-filter: blur(5px) saturate(115%);
    -webkit-backdrop-filter: blur(5px) saturate(115%);
}

.lwl-grove-gameframe--owmw .lwl-lexicongrove__rh-title-wrap {
    border-color: rgba(77, 196, 172, 0.44);
    background:
        radial-gradient(120% 130% at 22% 18%, rgba(71, 201, 173, 0.28), transparent 56%),
        radial-gradient(130% 120% at 84% 78%, rgba(130, 228, 202, 0.16), transparent 64%),
        linear-gradient(150deg, rgba(8, 36, 40, 0.94), rgba(10, 42, 47, 0.92) 42%, rgba(6, 27, 31, 0.96));
    box-shadow:
        0 10px 30px rgba(3, 16, 16, 0.42),
        inset 0 1px 0 rgba(230, 255, 248, 0.12),
        inset 0 0 34px rgba(66, 194, 167, 0.15);
}

.lwl-grove-gameframe--moonlight .lwl-lexicongrove__rh-title-wrap {
    border-color: rgba(143, 171, 255, 0.42);
    background:
        radial-gradient(120% 130% at 20% 14%, rgba(179, 198, 255, 0.3), transparent 56%),
        radial-gradient(130% 120% at 84% 80%, rgba(132, 229, 232, 0.1), transparent 62%),
        linear-gradient(150deg, rgba(17, 31, 68, 0.96), rgba(12, 23, 52, 0.94) 42%, rgba(8, 15, 35, 0.98));
    box-shadow:
        0 10px 30px rgba(2, 10, 28, 0.46),
        inset 0 1px 0 rgba(236, 243, 255, 0.12),
        inset 0 0 34px rgba(139, 169, 247, 0.14);
}

.lwl-lexicongrove__rh-title-wrap::before,
.lwl-lexicongrove__rh-title-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lwl-lexicongrove__rh-title-wrap::before {
    background:
        radial-gradient(140% 90% at 50% -10%, rgba(255, 255, 255, 0.54), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 52%);
    opacity: 0.72;
}

.lwl-lexicongrove__rh-title-wrap::after {
    width: 36%;
    left: -44%;
    background: linear-gradient(112deg, transparent 10%, rgba(255, 255, 255, 0.42) 48%, transparent 88%);
    mix-blend-mode: screen;
    opacity: 0.32;
    transform: skewX(-18deg);
    animation: lwl-lexi-rh-title-glimmer 8.2s ease-in-out infinite;
}

.lwl-lexicongrove__rh-kicker {
    position: relative;
    z-index: 1;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(116, 90, 44, 0.86);
    text-shadow: 0 0 8px rgba(223, 189, 112, 0.22);
}

.lwl-grove-gameframe--owmw .lwl-lexicongrove__rh-kicker {
    color: rgba(168, 238, 219, 0.86);
    text-shadow: 0 0 10px rgba(64, 191, 163, 0.35);
}

.lwl-grove-gameframe--moonlight .lwl-lexicongrove__rh-kicker {
    color: rgba(208, 220, 255, 0.86);
    text-shadow: 0 0 12px rgba(112, 146, 234, 0.34);
}

.lwl-lexicongrove__rh-title {
    position: relative;
    z-index: 1;
    margin: 2px 0 0;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 650;
    letter-spacing: 0.03em;
    color: rgba(49, 38, 24, 0.98);
    text-shadow: 0 0 14px rgba(235, 206, 141, 0.25), 0 0 24px rgba(255, 236, 192, 0.16);
}

.lwl-grove-gameframe--owmw .lwl-lexicongrove__rh-title {
    color: rgba(246, 255, 253, 0.98);
    text-shadow: 0 0 16px rgba(85, 214, 188, 0.28), 0 0 24px rgba(110, 235, 204, 0.12);
}

.lwl-grove-gameframe--moonlight .lwl-lexicongrove__rh-title {
    color: rgba(244, 248, 255, 0.98);
    text-shadow: 0 0 18px rgba(123, 154, 240, 0.24), 0 0 26px rgba(171, 204, 255, 0.12);
}

.lwl-lexicongrove__rh-close {
    grid-column: 3;
    justify-self: end;
    border: 1px solid rgba(193, 153, 74, 0.45);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 236, 211, 0.92));
    color: #3e301b;
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lwl-grove-gameframe--owmw .lwl-lexicongrove__rh-close {
    border-color: rgba(86, 204, 181, 0.48);
    background: linear-gradient(180deg, rgba(15, 53, 58, 0.9), rgba(8, 36, 40, 0.94));
    color: rgba(237, 255, 250, 0.94);
}

.lwl-grove-gameframe--moonlight .lwl-lexicongrove__rh-close {
    border-color: rgba(125, 156, 243, 0.44);
    background: linear-gradient(180deg, rgba(18, 34, 73, 0.92), rgba(9, 19, 44, 0.96));
    color: rgba(238, 245, 255, 0.96);
}

.lwl-lexicongrove__rh-close:hover,
.lwl-lexicongrove__rh-close:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 0 14px rgba(214, 171, 80, 0.34), 0 0 12px rgba(255, 244, 220, 0.22);
    outline: none;
}

.lwl-lexicongrove__rh-close:active {
    transform: translateY(1px);
}

.lwl-lexicongrove__rh-body {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 8px 10px 10px;
}

.lwl-lexicongrove__rh-body .lwl-runic-honeycomb,
.lwl-lexicongrove__rh-body .lwl-spelling-bee {
    margin: 0;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

.lwl-lexicongrove__rh-body .lwl-owmw,
.lwl-lexicongrove__rh-body .lwl-owmw .lwl-owmw-stage {
    margin: 0;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

.lwl-lexicongrove__moonlight-body {
    display: flex;
    min-height: 0;
    overflow: hidden;
    padding: 10px 12px 12px;
    touch-action: pan-y;
    overscroll-behavior: contain;
}

.lwl-lexicongrove__rh-body .lwl-moonlight-reflections {
    margin: 0;
    width: 100%;
}

.lwl-grove-gameframe .lwl-tt-stage,
.lwl-grove-gameframe .lwl-runic-stage,
.lwl-grove-gameframe .lwl-owmw-stage,
.lwl-grove-gameframe .lwl-moonlight-reflections {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0;
}

[data-lwl-resolution-profile="compact"] .lwl-lexicongrove__moonlight-body,
[data-lwl-resolution-profile="tablet"] .lwl-lexicongrove__moonlight-body {
    padding: 6px 8px 8px;
}

[data-lwl-resolution-profile="compact"] .lwl-grove-gameframe--moonlight,
[data-lwl-resolution-profile="tablet"] .lwl-grove-gameframe--moonlight {
    width: min(100%, 1120px);
}

.lwl-grove-gameframe .lwl-tt-stage,
.lwl-grove-gameframe .lwl-runic-stage,
.lwl-grove-gameframe .lwl-owmw-stage {
    overflow: hidden;
}

.lwl-lexicongrove__owmw-body .lwl-owmw-stage {
    max-height: 100%;
}

.lwl-lexicongrove__rh-empty {
    min-height: 200px;
    display: grid;
    place-items: center;
    color: rgba(234, 241, 255, 0.86);
    text-align: center;
}

.lwl-grove-game:hover,
.lwl-grove-game:focus-visible {
    transform: translate3d(0, -4px, 0) scale(1.015);
    background: transparent !important;
    background-image: none !important;
    outline: none;
}

.lwl-grove-game:hover .lwl-grove-game__icon img,
.lwl-grove-game:focus-visible .lwl-grove-game__icon img {
    filter:
        drop-shadow(0 14px 32px rgba(0, 0, 0, 0.54))
        drop-shadow(0 0 14px rgba(var(--glow-rgb), 0.52))
        drop-shadow(0 0 24px rgba(var(--glow-rgb), 0.32))
        brightness(1.05);
}

.lwl-grove-game:hover .lwl-grove-game__placard,
.lwl-grove-game:focus-visible .lwl-grove-game__placard {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.46),
        0 10px 22px rgba(0, 0, 0, 0.32),
        0 0 22px rgba(var(--glow-rgb), 0.34);
}

.lwl-grove-game:hover .lwl-grove-game__placard::after,
.lwl-grove-game:focus-visible .lwl-grove-game__placard::after {
    opacity: 0.36;
    animation: lwl-lexi-placard-shimmer 1.2s ease-out;
}

.lwl-grove-game:active {
    transform: translate3d(0, -1px, 0) scale(0.98);
    background: transparent !important;
    background-image: none !important;
}

.lwl-lexicongrove .lwl-lexicongrove__icon::before,
.lwl-lexicongrove .lwl-lexicongrove__icon::after,
.lwl-lexicongrove .lwl-lexicongrove__icon:hover::before,
.lwl-lexicongrove .lwl-lexicongrove__icon:hover::after,
.lwl-lexicongrove .lwl-lexicongrove__icon:focus-visible::before,
.lwl-lexicongrove .lwl-lexicongrove__icon:focus-visible::after {
    background: transparent !important;
    opacity: 0 !important;
}

.lwl-lexicongrove__icon .lwl-lexicongrove__flare {
    position: absolute;
    inset: 16% 10%;
    border-radius: 18px;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle, rgba(255, 216, 160, 0.48), rgba(255, 216, 160, 0) 64%);
}

.lwl-lexicongrove__icon.is-flaring .lwl-lexicongrove__flare {
    animation: lwl-lexi-flare 0.34s ease-out;
}

.lwl-lexicongrove__sparks {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
}

/* Adjust spark intensity by changing --lwl-lexi-spark-alpha and count in JS. */
.lwl-lexicongrove__spark {
    --spark-size: 5px;
    --spark-travel: 22px;
    position: absolute;
    width: var(--spark-size);
    height: var(--spark-size);
    border-radius: 999px;
    background: rgba(255, 222, 164, var(--lwl-lexi-spark-alpha, 0.78));
    box-shadow: 0 0 8px rgba(255, 194, 122, 0.45);
    animation: lwl-lexi-spark var(--spark-duration, 2.4s) ease-in-out infinite;
    animation-delay: var(--spark-delay, 0s);
}

.lwl-lexicongrove__modal {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: grid;
    place-items: center;
}

.lwl-lexicongrove__modal[hidden] {
    display: none;
}

.lwl-lexicongrove__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 12, 0.65);
    backdrop-filter: blur(3px);
}

.lwl-lexicongrove__modal-panel {
    position: relative;
    width: min(680px, calc(100% - 40px));
    background: linear-gradient(180deg, rgba(22, 27, 36, 0.92), rgba(9, 13, 20, 0.94));
    border: 1px solid rgba(255, 214, 148, 0.42);
    border-radius: 18px;
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.48), 0 0 28px rgba(255, 183, 110, 0.18);
    color: #f5ead8;
    padding: clamp(18px, 2.7vw, 28px);
    animation: lwl-lexi-modal-in 0.28s ease-out;
    text-align: center;
}

.lwl-lexicongrove__modal-title {
    font-size: clamp(20px, 2.2vw, 28px);
    margin: 0 0 12px;
    letter-spacing: 0.02em;
    text-align: center;
}

.lwl-lexicongrove__modal-copy {
    margin: 0;
    line-height: 1.65;
    font-size: clamp(14px, 1.32vw, 17px);
    color: rgba(255, 244, 226, 0.94);
    text-align: center;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.lwl-lexicongrove__modal-close {
    margin-top: 16px;
    border: 1px solid rgba(255, 214, 145, 0.42);
    background: linear-gradient(180deg, rgba(43, 54, 76, 0.9), rgba(23, 29, 40, 0.95));
    color: #f7e8cf;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    margin-left: auto;
    margin-right: auto;
}

.lwl-lexicongrove__arrival {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
}

.lwl-lexicongrove__arrival[hidden] {
    display: none;
}

.lwl-lexicongrove__arrival-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(42% 34% at 50% 50%, rgba(194, 211, 255, 0.2), transparent 72%),
        linear-gradient(180deg, rgba(8, 11, 18, 0.18), rgba(8, 11, 18, 0.56));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lwl-lexicongrove__arrival-panel {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 14px;
    width: min(560px, calc(100% - 40px));
    padding: 26px 24px;
    border-radius: 18px;
    border: 1px solid rgba(218, 229, 255, 0.34);
    background: linear-gradient(180deg, rgba(27, 37, 67, 0.92), rgba(11, 18, 39, 0.95));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42), 0 0 24px rgba(185, 205, 255, 0.16);
    animation: lwl-lexi-arrival-in 0.26s ease-out;
    text-align: center;
}

.lwl-lexicongrove__arrival-sigil {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 1px solid rgba(210, 224, 255, 0.42);
    background:
        radial-gradient(circle at 50% 50%, rgba(248, 252, 255, 0.82), rgba(151, 186, 255, 0.16) 42%, transparent 72%),
        linear-gradient(180deg, rgba(52, 73, 128, 0.92), rgba(24, 37, 74, 0.94));
    box-shadow: 0 0 20px rgba(166, 194, 255, 0.22);
    animation: lwl-lexi-arrival-pulse 1.05s ease-in-out infinite;
}

.lwl-lexicongrove__arrival-copy {
    margin: 0;
    max-width: 28ch;
    color: rgba(244, 248, 255, 0.96);
    font-size: clamp(15px, 1.36vw, 18px);
    line-height: 1.55;
}

@keyframes lwl-lexi-flare {
    0% { opacity: 0; transform: scale(0.88); }
    28% { opacity: 1; transform: scale(1.01); }
    100% { opacity: 0; transform: scale(1.18); }
}

@keyframes lwl-lexi-spark {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.7);
    }
    22% {
        opacity: 1;
        transform: translate3d(0, calc(var(--spark-travel) * -0.35), 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate3d(0, calc(var(--spark-travel) * -1), 0) scale(0.76);
    }
}

@keyframes lwl-lexi-modal-in {
    from {
        opacity: 0;
        transform: translate3d(0, 14px, 0) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes lwl-lexi-arrival-in {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes lwl-lexi-arrival-pulse {
    0% {
        transform: scale(0.92);
        opacity: 0.74;
    }
    55% {
        transform: scale(1.03);
        opacity: 1;
    }
    100% {
        transform: scale(0.96);
        opacity: 0.84;
    }
}

@keyframes lwl-lexi-placard-shimmer {
    0% {
        left: -42%;
        opacity: 0;
    }
    35% {
        opacity: 0.44;
    }
    100% {
        left: 120%;
        opacity: 0;
    }
}

@keyframes lwl-lexi-rh-title-glimmer {
    0%,
    65%,
    100% {
        transform: translateX(0) skewX(-18deg);
        opacity: 0;
    }
    72% {
        opacity: 0.3;
    }
    84% {
        transform: translateX(440%) skewX(-18deg);
        opacity: 0.2;
    }
}

@keyframes lwl-lexi-rh-drift {
    0% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-10px, 6px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .lwl-lexicongrove__rh-panel::before,
    .lwl-lexicongrove__rh-title-wrap::after {
        animation-duration: 120ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (max-width: 860px) {
    .lwl-lexicongrove__layout {
        align-items: center;
        padding: clamp(14px, 3vw, 22px) 12px clamp(14px, 3vw, 22px);
    }

    .lwl-grove-gamebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .lwl-grove-game {
        gap: 8px;
    }

    .lwl-grove-game__icon {
        width: 100%;
    }

    .lwl-grove-game__placard {
        width: 96%;
        font-size: clamp(10px, 1.8vw, 12px);
        padding: 8px 8px 9px;
    }

    .lwl-lexicongrove-card {
        min-height: 160px;
    }

    .lwl-grove-gameframe {
        --lwl-grove-frame-width: min(1040px, calc(100% - 10px));
        --lwl-grove-frame-height: min(760px, 88vh);
    }
}

/* =============================================================
   STAGE PROFILE: Tablet — Lexicon Grove game frame width fix
   .lwl-grove-gameframe (and its game-specific modifiers) use
   --lwl-grove-frame-width: min(1040px, 94vw). On wide-viewport
   devices (iPad Pro landscape, desktop) 94vw > 1040px so the
   frame locks to 1040px — wider than the 980px tablet stage shell
   — clipping the right side of the Runic Honeycomb (More button,
   rank dots). Fix: cap frame to 958px, comfortably within the
   stage shell, while still honouring 94vw on narrow devices.
   ============================================================= */
[data-lwl-display-profile="tablet"] .lwl-grove-gameframe,
[data-lwl-display-profile="tablet"] .lwl-grove-gameframe--runic,
[data-lwl-display-profile="tablet"] .lwl-grove-gameframe--twilight,
[data-lwl-display-profile="tablet"] .lwl-grove-gameframe--owmw {
    --lwl-grove-frame-width: min(958px, 94vw);
}

/* === Spellbook tile (parchment / tannin / amber) ============================
   Variant tokens for the .lwl-grove-game--spellbook tile and its modal frame.
   Sticks to the same .lwl-grove-game__icon dimensions so the SVG slot replaces
   an <img> at parity without disturbing layout. */
.lwl-grove-game--spellbook {
    --accent-1: #e7c887;
    --accent-2: #b3812e;
    --glass-a: rgba(58, 32, 14, 0.92);
    --glass-b: rgba(35, 18, 6, 0.92);
    --glow-rgb: 232, 195, 122;
    --label-text: #fff3d6;
}

/* SVG sits where the <img> would; same border radius + glow + drop shadow.    */
.lwl-grove-game__icon--svg {
    width: min(300px, 100%);
    aspect-ratio: 1 / 1;
    display: block;
}

.lwl-grove-game__icon--svg .lwl-grove-game__svg {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    filter:
        drop-shadow(0 12px 28px rgba(0, 0, 0, 0.46))
        drop-shadow(0 0 12px rgba(232, 195, 122, 0.28));
    transition: filter 0.25s ease, transform 0.25s ease;
}

.lwl-grove-game--spellbook:hover .lwl-grove-game__svg {
    filter:
        drop-shadow(0 14px 30px rgba(0, 0, 0, 0.5))
        drop-shadow(0 0 18px rgba(232, 195, 122, 0.42));
}

/* Modal frame parity with other gameframes, parchment-tinted.
   Wider + taller than the base gameframe (and than moonlight's 1220×900) so
   the embedded [lwl_spell_book] grid has room to breathe — the spellbook
   shell wants vertical space for stats + index tabs + a 6-card folio. */
.lwl-grove-gameframe--spellbook {
    --lwl-grove-frame-width: min(1440px, 96vw);
    --lwl-grove-frame-height: min(1000px, 94vh);
    background:
        radial-gradient(120% 100% at 0% 0%, rgba(232, 195, 122, 0.18), transparent 55%),
        linear-gradient(165deg, rgba(58, 32, 14, 0.95), rgba(28, 14, 4, 0.97));
    border: 1px solid rgba(232, 195, 122, 0.45);
}

.lwl-grove-gameframe--spellbook .lwl-lexicongrove__rh-kicker {
    color: rgba(232, 195, 122, 0.95);
    letter-spacing: 0.18em;
}

.lwl-grove-gameframe--spellbook .lwl-lexicongrove__rh-title {
    color: #fff3d6;
}

.lwl-grove-gameframe--spellbook .lwl-lexicongrove__rh-close {
    color: rgba(255, 243, 214, 0.92);
}

/* Tighter body padding inside the spellbook modal so the existing
   .lwl-spell-book__shell grid has breathing room without scroll. */
.lwl-lexicongrove__spellbook-body {
    padding: 14px 18px 18px;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lwl-lexicongrove__spellbook-body .lwl-spell-book {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 640px) {
    .lwl-lexicongrove__spellbook-body {
        padding: 10px 10px 12px;
    }
}
