:is(#april-bubble-palace, #heralda-cosmic-workshop, #jelly-cell-workshop, #jaffar-rune-workshop).lmc-shell {
    --lmc-light: color-mix(in srgb, var(--lmc-accent) 38%, #fff);
    --lmc-line: color-mix(in srgb, var(--lmc-accent) 34%, transparent);
    --lmc-panel: #0d1323ed;
    --lmc-dim: #c9d0e2;
    --lmc-gutter: clamp(12px, 3vw, 27px);
    width: min(960px, calc(100% - 22px));
    max-height: calc(100dvh - 22px);
    padding: 0;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--lmc-line);
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 12% 0, color-mix(in srgb, var(--lmc-shade) 80%, transparent), transparent 70%),
        #090c18;
    box-shadow: 0 25px 85px #000c, 0 0 38px var(--lmc-line);
    color: #fbfaff;
    font: 500 1rem/1.4 Outfit, system-ui, sans-serif;
}

.lmc-shell[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.lmc-shell::backdrop { background: #030612dc; backdrop-filter: blur(7px); }
.lmc-shell::before { pointer-events: none; }
.lmc-shell .lmc-aura {
    position: absolute;
    z-index: -1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    color: var(--lmc-accent);
    opacity: .34;
}

.lmc-aura > i,
.lmc-jelly-lights i {
    position: absolute;
    left: calc(5% + mod(var(--m-i, var(--j-i, 0)) * 29%, 89%));
    top: calc(12% + mod(var(--m-i, var(--j-i, 0)) * 23%, 76%));
    width: calc(10px + mod(var(--m-i, var(--j-i, 0)) * 9px, 31px));
    aspect-ratio: 1;
    fill: currentColor;
    filter: drop-shadow(0 0 7px currentColor);
    animation: lmc-drift 7s calc(var(--m-i, var(--j-i, 0)) * -.47s) ease-in-out infinite alternate;
}
.lmc-jelly-lights i { border: 1px solid currentColor; border-radius: 50%; }
.lmc-rune-glow { position: absolute; inset: 0; background: repeating-radial-gradient(ellipse at 80% 30%, transparent 0 68px, var(--lmc-line) 69px 70px, transparent 71px 82px); }
.lmc-rune-glow > i {
    position: absolute;
    width: 148px;
    aspect-ratio: 1;
    border: 1px dashed currentColor;
    border-radius: 29%;
    inset: 13% 8% auto auto;
    animation: lmc-spin 33s linear infinite;
}
.lmc-rune-glow > i:nth-child(2) { inset: 60% auto auto 3%; animation-direction: reverse; }
.lmc-rune-glow > i:nth-child(3) { inset: auto 20% 6% auto; width: 72px; }

:is(#april-bubble-palace, #heralda-cosmic-workshop, #jelly-cell-workshop, #jaffar-rune-workshop).lmc-shell > .lmc-header {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(8px, 2vw, 14px);
    padding: 13px var(--lmc-gutter);
    border-bottom: 1px solid var(--lmc-line);
    background: linear-gradient(115deg, color-mix(in srgb, var(--lmc-shade) 40%, #111526), #090d1aeb);
}

.lmc-header__crest {
    width: clamp(38px, 7vw, 53px);
    height: clamp(38px, 7vw, 53px);
    object-fit: contain;
    filter: drop-shadow(0 0 10px var(--lmc-accent));
}
.lmc-shell .lmc-header small {
    font-size: .74rem;
    font-weight: 750;
    letter-spacing: .12em;
    color: var(--lmc-light);
    text-transform: uppercase;
}
.lmc-shell .lmc-header h2 {
    margin: 2px 0 0;
    color: inherit;
    font: 800 clamp(1.32rem, 4vw, 2.15rem)/1.12 Outfit, system-ui, sans-serif;
    overflow-wrap: anywhere;
}
:is(#april-bubble-palace, #heralda-cosmic-workshop, #jelly-cell-workshop, #jaffar-rune-workshop).lmc-shell > .lmc-header button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--lmc-line);
    border-radius: 50%;
    color: #fff;
    background: #070b17;
    font: 750 1.3rem/1 Outfit, system-ui, sans-serif;
    cursor: pointer;
}
.lmc-shell :is(button, summary):focus-visible { outline: 2px solid var(--lmc-light); outline-offset: 2px; }
.lmc-shell .lmc-body {
    position: relative;
    min-height: 0;
    display: grid;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 14px;
    padding: 14px var(--lmc-gutter) 18px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--lmc-line) transparent;
}
.lmc-body :is(p, ul, h3, dl, dd) { margin: 0; }
.lmc-body :is(p, li, dd, dt, small) { overflow-wrap: anywhere; }
.lmc-shell .lmc-section-title { margin: 1px 0 8px; color: #fff; font: 750 1.1rem/1.2 Outfit, system-ui, sans-serif; }

.lmc-instrument {
    position: relative;
    display: grid;
    grid-template-columns: minmax(60px, .35fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(8px, 3vw, 27px);
    padding: clamp(10px, 3vw, 21px);
    border: 1px solid var(--lmc-line);
    border-radius: 13px;
    background:
        repeating-linear-gradient(135deg, transparent 0 22px, #f6f0ff08 23px, transparent 24px 40px),
        radial-gradient(ellipse at 8% 24%, color-mix(in srgb, var(--lmc-accent) 21%, #111628), #0a111f 77%);
}
.lmc-art {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    width: min(100%, 160px);
    aspect-ratio: 1;
    justify-self: center;
}
.lmc-art::before,
.lmc-art::after {
    position: absolute;
    z-index: -1;
    content: "";
    border: 1px solid var(--lmc-line);
    inset: 8%;
    border-radius: 50%;
    box-shadow: 0 0 16px var(--lmc-line), inset 0 0 16px var(--lmc-line);
}
.lmc-art::after {
    inset: 2%;
    border-style: dashed;
    animation: lmc-spin 24s linear infinite;
}
.lmc-art img {
    width: 77%;
    aspect-ratio: 1;
    object-fit: contain;
    filter: drop-shadow(0 0 14px var(--lmc-accent));
    animation: lmc-float 3.8s ease-in-out infinite alternate;
}
.lmc-display { min-width: 0; }
.lmc-shell .lmc-label { color: var(--lmc-light); font-weight: 700; }
.lmc-shell .lmc-count {
    color: #fff;
    margin: 4px 0 7px;
    font: 800 clamp(1.85rem, 7vw, 4rem)/1 Outfit, system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}
.lmc-shell .lmc-count small { color: var(--lmc-dim); font: 700 clamp(.87rem, 2.5vw, 1.18rem)/1 Outfit, system-ui, sans-serif; }
.lmc-gauge { height: 7px; overflow: hidden; border-radius: 10px; background: #02050e; box-shadow: inset 0 0 0 1px var(--lmc-line); }
.lmc-gauge i {
    display: block;
    height: 100%;
    width: var(--lmc-fill);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--lmc-accent), var(--lmc-light));
    box-shadow: 0 0 10px var(--lmc-accent);
    transition: width .3s ease;
}
.lmc-body .lmc-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 17px;
    margin-top: 8px;
    color: var(--lmc-dim);
}
.lmc-metrics > div { min-width: 0; padding-inline-start: 8px; border-inline-start: 1px solid var(--lmc-line); }
.lmc-metrics dt { font-size: .8rem; }
.lmc-shell .lmc-metrics dd { margin-top: 2px; color: #fff; font-size: .94rem; font-weight: 750; }
.lmc-effects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
    gap: 7px;
}
.lmc-effect, .lmc-stats, .lmc-charge-panel, .lmc-bubble-row, .lmc-slots > li {
    min-width: 0;
    border: 1px solid var(--lmc-line);
    border-radius: 10px;
    background: var(--lmc-panel);
}
.lmc-effect {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px;
}
.lmc-effect[data-active="true"] {
    border-color: var(--lmc-accent);
    background: linear-gradient(120deg, color-mix(in srgb, var(--lmc-shade) 40%, #151b2d), #0d1426 84%);
}
.lmc-effect img, .lmc-bubble-row li img { width: 35px; height: 35px; flex: 0 0 35px; object-fit: contain; border-radius: 6px; }
.lmc-effect h3 { margin: 0 0 2px; color: var(--lmc-light); font: 750 .98rem/1.15 Outfit, system-ui, sans-serif; }
.lmc-effect p, .lmc-bubble-row p, .lmc-slots p, .lmc-charge-panel p { color: var(--lmc-dim); font-size: .85rem; }
.lmc-effect b { font-size: .86rem; }
.lmc-stats { padding: 8px 11px; }
.lmc-stats summary { color: var(--lmc-light); font-weight: 680; cursor: pointer; }
.lmc-stats[open] { padding-bottom: 11px; }

.lmc-bubble-team { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(205px, 100%), 1fr)); gap: 8px; }
.lmc-bubble-row { padding: 8px; }
.lmc-bubble-row[data-fallen="true"] { opacity: .64; }
.lmc-bubble-row header { display: flex; gap: 7px; align-items: center; }
.lmc-bubble-row header img { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; object-fit: cover; }
.lmc-bubble-row header div { min-width: 0; flex: 1; }
.lmc-bubble-row header h3 { color: #fff; font: 750 1rem/1.15 Outfit, system-ui, sans-serif; overflow-wrap: anywhere; }
.lmc-bubble-row small, .lmc-slots small { color: var(--lmc-dim); font-size: .78rem; }
.lmc-bubble-row header b { color: var(--lmc-light); font-size: .86rem; }
.lmc-bubble-row ul { display: grid; gap: 4px; margin-top: 7px; padding: 0; list-style: none; }
.lmc-bubble-row li { display: flex; gap: 6px; align-items: center; padding: 4px; border-radius: 7px; background: #ffffff08; }
.lmc-bubble-row li > div { min-width: 0; }
.lmc-bubble-row li small, .lmc-bubble-row li strong { display: block; }
.lmc-bubble-row li strong { font-size: .85rem; }
.lmc-bubble-row p { margin: 6px 1px 0; }

.lmc-slots { display: grid; gap: 6px; padding: 0; list-style: none; }
.lmc-slots > li { display: grid; gap: 3px; align-content: start; padding: 7px; }
.lmc-slots > li:is(.is-current,.is-devourer) {
    border-color: var(--lmc-accent);
    box-shadow: inset 0 -2px var(--lmc-accent);
    background: radial-gradient(ellipse at 50% 5%, var(--lmc-line), transparent 90%), var(--lmc-panel);
}
.lmc-nest { grid-template-columns: repeat(6, minmax(0, 1fr)); text-align: center; }
.lmc-nest li > span { display: grid; height: 39px; place-items: center; }
.lmc-nest svg { width: 70%; height: 100%; }
.lmc-nest li i { width: 19px; height: 19px; border: 1px dashed var(--lmc-accent); border-radius: 50%; }
.lmc-nest .is-empty { opacity: .67; }
.lmc-cell-stages { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lmc-cell-stages li > img, .lmc-rune-charges li > img { width: 37px; height: 37px; object-fit: contain; }
.lmc-cell-stages strong { line-height: 1.18; overflow-wrap: anywhere; }
.lmc-charge-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(130px, .75fr);
    align-items: center;
    gap: 9px;
    padding: 9px;
}
.lmc-charge-panel .lmc-section-title { margin-bottom: 4px; }
.lmc-rune-charges { grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; }
.lmc-rune-charges li { justify-items: center; }
.lmc-rune-charges li:not(.is-current) img { opacity: .36; filter: grayscale(.6); }

@keyframes lmc-spin { to { transform: rotate(1turn); } }
@keyframes lmc-float { to { transform: translateY(-6%); } }
@keyframes lmc-drift { to { transform: translate(9px, -18px) rotate(11deg); opacity: .65; } }

@media (max-width: 560px) {
    .lmc-shell .lmc-body { gap: 11px; padding-top: 11px; }
    .lmc-cell-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lmc-nest { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lmc-charge-panel { grid-template-columns: minmax(0, 1fr); }
    .lmc-instrument { grid-template-columns: 55px minmax(0, 1fr); align-items: start; }
}
@media (max-width: 360px) {
    .lmc-shell .lmc-header { gap: 7px; }
    .lmc-header__crest { width: 31px; height: 31px; }
    .lmc-shell .lmc-header h2 { font-size: 1.12rem; }
}
@media (prefers-reduced-motion: reduce) {
    .lmc-shell .lmc-aura *, .lmc-art img, .lmc-art::after { animation: none; }
    .lmc-gauge i { transition: none; }
}
