.menu-preview {
    position: relative;
    width: 100%;
    max-width: 700px;
}

.eve {
    --accent: #c7e6f3;
    --accent-dark: #6d7e86;
    --accent-soft: #82949d;
    --active: #d9dee6;
    --body: #808791;
    --hover: #b8bfc9;
    --outer: #050506;
    --inner: #2e3034;
    --panel: #0e0f10;
    --child: #141517;
    --container-top: #1b1c1f;
    --container-bottom: #0b0b0c;
    --tab-top: #16171a;
    --tab-bottom: #0c0c0e;
    --tab-top-active: #2a2c2f;
    --tab-bottom-active: #191a1d;
    --child-top: #121315;
    --child-bottom: #0a0a0b;
    --separator: #4d5259;
    --outline: 1px 0 0 #050506, -1px 0 0 #050506, 0 1px 0 #050506, 0 -1px 0 #050506;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 480px;
    padding: 3px;
    text-align: left;
    color: var(--body);
    font: bold 11px/13px Verdana, "DejaVu Sans", Geneva, Tahoma, sans-serif;
    letter-spacing: 0;
    background: linear-gradient(var(--container-top), var(--container-bottom));
    border: 1px solid var(--outer);
    box-shadow: inset 0 0 0 1px var(--inner), inset 0 0 0 2px var(--outer);
    user-select: none;
    -webkit-user-select: none;
    -webkit-font-smoothing: none;
    font-smooth: never;
    transition: opacity .25s ease, transform .25s ease;
}

.eve.gone {
    opacity: 0;
    transform: scale(.985);
    pointer-events: none;
}

.eve *,
.eve *::before,
.eve *::after {
    box-sizing: border-box;
}

.eve-frame {
    border: 1px solid var(--outer);
    box-shadow: inset 0 0 0 1px var(--inner), inset 0 0 0 2px var(--outer);
}

.eve-title {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 26px;
    padding: 0 7px;
    color: var(--active);
    text-shadow: var(--outline);
}

.eve-title .wave span {
    display: inline-block;
    white-space: pre;
    animation: eve-wave 2.094s ease-in-out infinite;
}

.eve-title .uid {
    color: var(--body);
}

.eve-accent {
    flex: none;
    position: relative;
    overflow: hidden;
    height: 6px;
    margin: 0 4px;
    padding: 1px;
    border: 1px solid var(--outer);
    box-shadow: inset 0 0 0 1px var(--inner);
    background: linear-gradient(var(--accent), var(--accent-dark)) content-box;
}

.eve-accent::after {
    content: "";
    position: absolute;
    top: 1px;
    bottom: 1px;
    left: 0;
    width: 30%;
    background: linear-gradient(90deg, #ffffff00, #ffffff99, #ffffff00);
    transform: translateX(-100%);
    animation: eve-shine 3s infinite;
}

.eve-tabs {
    flex: none;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    height: 28px;
    margin: 4px 4px 0;
    padding: 3px;
}

.eve-tab {
    display: grid;
    place-items: center;
    overflow: hidden;
    white-space: nowrap;
    color: var(--body);
    background: linear-gradient(var(--tab-top), var(--tab-bottom));
    cursor: pointer;
    transition: color .15s, background .15s;
}

.eve-tab:hover {
    color: var(--hover);
    background: linear-gradient(#1f2023, #121315);
}

.eve-tab.on {
    color: var(--active);
    background: linear-gradient(var(--tab-top-active), var(--tab-bottom-active));
}

.eve-body {
    position: relative;
    flex: 1;
    min-height: 0;
    margin: 4px;
    padding: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--panel);
    scrollbar-width: thin;
    scrollbar-color: var(--accent-dark) transparent;
}

.eve-body::-webkit-scrollbar {
    width: 4px;
}

.eve-body::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent), var(--accent-dark));
}

.eve-page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    align-items: start;
    animation: eve-slide .22s ease-out;
}

.eve-page[hidden] {
    display: none;
}

.eve-column {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.eve-group {
    position: relative;
    min-width: 0;
    margin-top: 7px;
    padding: 13px 10px 7px;
    background: var(--child);
}

.eve-group > h4 {
    position: absolute;
    top: -7px;
    left: 8px;
    margin: 0;
    padding: 0 4px;
    font: inherit;
    line-height: 13px;
    color: var(--active);
    text-shadow: var(--outline);
    background: var(--child);
}

.eve-row {
    margin-bottom: 4px;
}

.eve-row[hidden] {
    display: none;
}

.eve-row:last-child {
    margin-bottom: 0;
}

.eve-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 13px;
    cursor: pointer;
}

.eve-check {
    position: relative;
    flex: none;
    width: 13px;
    height: 13px;
    background: var(--container-bottom);
    box-shadow: inset 0 0 0 1px var(--outer), inset 0 0 0 2px var(--inner);
    transition: box-shadow .15s;
}

.eve-check::after {
    content: "";
    position: absolute;
    inset: 5px;
    opacity: 0;
    background: linear-gradient(var(--accent), var(--accent-dark));
    transition: inset .18s cubic-bezier(.22, 1, .36, 1), opacity .15s;
}

.eve-toggle.on .eve-check {
    box-shadow: inset 0 0 0 1px var(--outer), inset 0 0 0 2px var(--accent);
}

.eve-toggle.on .eve-check::after {
    inset: 2px;
    opacity: 1;
}

.eve-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: color .15s;
}

.eve-toggle:hover .eve-name {
    color: var(--hover);
}

.eve-toggle.on .eve-name {
    color: var(--active);
}

.eve-swatch {
    flex: none;
    width: 26px;
    height: 13px;
    background: var(--swatch, var(--accent));
    box-shadow: inset 0 0 0 1px var(--outer), inset 0 0 0 2px #ffffff26;
    cursor: pointer;
}

.eve-swatch:hover {
    box-shadow: inset 0 0 0 1px var(--outer), inset 0 0 0 2px #ffffff66;
}

.eve-key {
    flex: none;
    color: var(--separator);
    cursor: pointer;
    transition: color .15s;
}

.eve-key:hover {
    color: var(--hover);
}

.eve-key.waiting {
    color: var(--accent);
}

.eve-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 13px;
}

.eve-line .eve-name {
    flex: 1;
}

.eve-value {
    flex: none;
    color: var(--active);
    transition: color .15s;
}

.eve-slider {
    cursor: ew-resize;
    touch-action: pan-y;
}

.eve-slider:hover .eve-name,
.eve-slider.held .eve-name {
    color: var(--active);
}

.eve-slider:hover .eve-value,
.eve-slider.held .eve-value {
    color: var(--accent);
}

.eve-rail {
    position: relative;
    height: 9px;
    margin-top: 4px;
    background: var(--container-bottom);
    box-shadow: inset 0 0 0 1px var(--outer), inset 0 0 0 2px var(--inner);
}

.eve-rail > i {
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 2px;
    width: 0;
    max-width: calc(100% - 4px);
    background: linear-gradient(var(--accent), var(--accent-dark));
}

.eve-combo .eve-name {
    display: block;
    height: 13px;
}

.eve-combo:hover .eve-name,
.eve-combo.open .eve-name {
    color: var(--active);
}

.eve-box {
    position: relative;
    display: flex;
    align-items: center;
    height: 22px;
    margin-top: 4px;
    padding: 0 18px 0 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--body);
    background: linear-gradient(var(--child-top), var(--child-bottom));
    box-shadow: inset 0 0 0 1px var(--outer), inset 0 0 0 2px var(--inner);
    cursor: pointer;
    transition: color .15s, box-shadow .15s;
}

.eve-box > span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.eve-box::after {
    content: "";
    position: absolute;
    right: 7px;
    top: 9px;
    border: 4px solid transparent;
    border-top: 4px solid var(--body);
    border-bottom: 0;
    transition: transform .15s;
}

.eve-combo:hover .eve-box,
.eve-combo.open .eve-box {
    color: var(--active);
}

.eve-combo.open .eve-box {
    box-shadow: inset 0 0 0 1px var(--outer), inset 0 0 0 2px var(--accent);
}

.eve-combo.open .eve-box::after {
    transform: rotate(180deg);
}

.eve-button {
    display: grid;
    place-items: center;
    height: 22px;
    color: var(--body);
    background: linear-gradient(var(--child-top), var(--child-bottom));
    box-shadow: inset 0 0 0 1px var(--outer), inset 0 0 0 2px var(--inner);
    cursor: pointer;
    transition: color .15s, box-shadow .15s, background .15s;
}

.eve-button:hover {
    color: var(--active);
    background: linear-gradient(#c7e6f31f, #6d7e861f), linear-gradient(var(--child-top), var(--child-bottom));
    box-shadow: inset 0 0 0 1px var(--outer), inset 0 0 0 2px var(--accent-soft);
}

.eve-button:active {
    box-shadow: inset 0 0 0 1px var(--outer), inset 0 0 0 2px var(--accent);
}

.eve-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.eve-list {
    position: absolute;
    max-height: 132px;
    padding: 3px;
    overflow-y: auto;
    pointer-events: auto;
    background: linear-gradient(var(--child-top), var(--child-bottom));
    border: 1px solid var(--outer);
    box-shadow: inset 0 0 0 1px var(--inner), 0 10px 24px #000000a0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-dark) transparent;
    animation: eve-drop .16s ease-out;
}

.eve-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 18px;
    padding: 0 4px;
    overflow: hidden;
    white-space: nowrap;
    color: var(--body);
    cursor: pointer;
}

.eve-item:hover {
    color: var(--active);
    background: linear-gradient(var(--tab-top-active), var(--tab-bottom-active));
}

.eve-item.on {
    color: var(--accent);
}

.eve-item.on::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 2px;
    background: linear-gradient(var(--accent), var(--accent-dark));
}

.eve-colors {
    position: absolute;
    display: grid;
    grid-template-columns: repeat(5, 18px);
    gap: 3px;
    padding: 5px;
    pointer-events: auto;
    background: linear-gradient(var(--child-top), var(--child-bottom));
    border: 1px solid var(--outer);
    box-shadow: inset 0 0 0 1px var(--inner), 0 10px 24px #000000a0;
    animation: eve-drop .16s ease-out;
}

.eve-colors > b {
    width: 18px;
    height: 13px;
    background: var(--swatch);
    box-shadow: inset 0 0 0 1px var(--outer), inset 0 0 0 2px #ffffff26;
    cursor: pointer;
}

.eve-colors > b:hover,
.eve-colors > b.on {
    box-shadow: inset 0 0 0 1px var(--outer), inset 0 0 0 2px var(--accent);
}

.eve-confirm {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: auto;
    background: #00000080;
    animation: eve-fade .15s ease-out;
}

.eve-confirm > div {
    width: 240px;
    padding: 3px;
    background: linear-gradient(var(--container-top), var(--container-bottom));
}

.eve-confirm p {
    margin: 0;
    padding: 8px 7px 10px;
    color: var(--active);
    text-shadow: var(--outline);
}

.eve-confirm .eve-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 0 4px 4px;
}

.eve-hint {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #808791;
    font: bold 11px/1.6 Verdana, "DejaVu Sans", Geneva, Tahoma, sans-serif;
    text-align: center;
    cursor: pointer;
    -webkit-font-smoothing: none;
}

.eve-note {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 210px;
    padding: 5px 7px 6px;
    pointer-events: none;
    background: linear-gradient(var(--container-top), var(--container-bottom));
    border: 1px solid var(--outer);
    box-shadow: inset 0 0 0 1px var(--inner), inset 0 0 0 2px var(--outer);
    animation: eve-drop .16s ease-out;
    transition: opacity .25s, transform .25s;
}

.eve-note.gone {
    opacity: 0;
    transform: translateX(10px);
}

.eve-note .head {
    display: flex;
    justify-content: space-between;
    color: var(--active);
    text-shadow: var(--outline);
}

.eve-note .time {
    color: var(--separator);
}

.eve-note .drain {
    height: 2px;
    margin: 4px 0 5px;
    background: #ffffff10;
}

.eve-note .drain > i {
    display: block;
    height: 100%;
    background: var(--accent);
    animation: eve-drain 2.5s linear forwards;
}

.eve-note .text {
    color: var(--hover);
}

@keyframes eve-drain {
    from { width: 100%; }
    to { width: 0; }
}

.eve-hint b {
    color: #c7e6f3;
}

@keyframes eve-wave {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(2px); }
    75% { transform: translateY(-2px); }
}

@keyframes eve-shine {
    0% { transform: translateX(-100%); opacity: 1; }
    45% { transform: translateX(433%); opacity: 1; }
    45.1%, 100% { transform: translateX(433%); opacity: 0; }
}

@keyframes eve-slide {
    from { opacity: 0; transform: translateY(8px); }
}

@keyframes eve-drop {
    from { opacity: 0; transform: translateY(-4px); }
}

@keyframes eve-fade {
    from { opacity: 0; }
}

@media (max-width: 700px) {
    .eve {
        height: 520px;
    }

    .eve-page {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .eve-title .wave span,
    .eve-accent::after,
    .eve-page,
    .eve-list,
    .eve-colors {
        animation: none;
    }
}
