.vx-demo {
    min-width: 0;
    margin: 0;
    border: 1px solid #58452b;
    border-radius: 8px;
    overflow: hidden;
    background: #14100c;
    color: #eee1c3;
    font: 15px/1.5 Arial, sans-serif;
}
.vx-demo[hidden], .vx-demo [hidden] { display: none !important; }
.vx-demo-stage { position: relative; isolation: isolate; overflow: hidden; background: #10100d; }
.vx-demo-stage .vx-demo-image { display: block; width: 100%; height: auto; margin: 0; border: 0; }
.vx-demo[data-active] .vx-demo-image { height: 100%; object-fit: fill; }
.vx-demo-scene { position: absolute; inset: 0; pointer-events: none; display: none; }
.vx-demo[data-active] .vx-demo-scene { display: block; }
.vx-demo-focus {
    position: absolute;
    z-index: 2;
    outline: 2px solid #f6ce77;
    border-radius: 4px;
    box-shadow: 0 0 0 100vmax #08060491, 0 0 14px #f6ce7780, inset 0 0 10px #f6ce7730;
}
.vx-demo-pointer {
    position: absolute;
    z-index: 3;
    width: clamp(12px, 2.7%, 20px);
    aspect-ratio: 1;
    transform: translate(-5%, -5%);
    background: #fff3ce;
    clip-path: polygon(0 0, 5% 93%, 27% 71%, 45% 100%, 63% 90%, 45% 62%, 77% 59%);
    transition: left 160ms ease-out, top 160ms ease-out;
}
.vx-demo[data-state="confirm"] :is(.vx-demo-focus,.vx-demo-pointer) { display: none; }
.vx-demo-input, .vx-demo-tracked, .vx-demo-tracked-count, .vx-demo-dialog { display: none; position: absolute; }
.vx-demo:is([data-state="type"],[data-state="typed"]) .vx-demo-input {
    display: flex;
    align-items: center;
    left: 5%; top: 27%; width: 64%; height: 5.4%; padding-left: .3em;
    background: #100d0a; color: #fff2d8; font-size: clamp(11px, 2.2vw, 18px);
}
.vx-demo[data-state="tracked"] .vx-demo-tracked {
    display: block;
    left: 3%; top: 45%; width: 91%; height: 39%; padding: 2%;
    background: #1b1710; box-sizing: border-box;
    font-size: clamp(11px, 2.2vw, 17px);
}
.vx-demo-tracked span {
    display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px;
    border: 1px solid #736044; background: #302619; color: #fff2d8;
}
.vx-demo-tracked i { width: 12px; height: 12px; border-radius: 50%; background: #e7ae3d; border: 1px solid #fff0a7; box-shadow: inset 0 0 0 2px #9b6325; }
.vx-demo[data-state="tracked"] .vx-demo-tracked-count {
    display: block; z-index: 3; right: 2%; top: 39%; padding: .15em .3em;
    color: #b5d5bf; background: #191610; font: 600 clamp(9px, 1.4vw, 13px)/1.4 Arial, sans-serif;
}
.vx-demo[data-state="confirm"] .vx-demo-dialog {
    display: block;
    z-index: 4;
    left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(76%, 340px);
    box-sizing: border-box; padding: clamp(8px, 1.6vw, 17px); text-align: center;
    box-shadow: 0 0 0 100vmax #080604a0;
    border: 1px solid #bd9654; background: #211b12; color: #f0e3c5;
    font-size: clamp(11px, 2vw, 16px);
}
.vx-demo-dialog strong { color: #f7d483; }
.vx-demo-dialog p { margin: .4em 0 .6em; color: inherit; }
.vx-demo-dialog span { display: inline-block; padding: .25em .9em; background: #53401d; border: 1px solid #9f7c43; }
.vx-demo-caption { padding: 12px 14px; background: #18130e; border-top: 1px solid #4c3a23; }
.vx-demo-caption > strong { color: #f3d99b; display: block; font-size: 16px; }
.vx-demo-description { display: grid; color: #ddd0b6; font-size: 14px; margin: .25em 0 .65em; min-height: 2.7em; }
.vx-demo-description > span { grid-area: 1 / 1; }
.vx-demo-caption-space { visibility: hidden; }
.vx-demo[data-playing='false'] .vx-demo-pointer { transition: none; }
.vx-demo-controls, .vx-demo-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vx-demo .vx-demo-start, .vx-demo .vx-demo-toggle, .vx-demo .vx-demo-steps button {
    font: 600 13px/1.25 Arial, sans-serif;
    color: #f1ddb2;
    background: #2b2116;
    border: 1px solid #7d6039;
    border-radius: 5px;
    min-width: 40px;
    min-height: 40px;
    padding: 8px 12px;
    cursor: pointer;
}
.vx-demo .vx-demo-controls button:hover, .vx-demo .vx-demo-steps button[aria-current="step"] { color: #211508; background: #e6bd71; }
.vx-demo button:focus-visible { outline: 2px solid #ffe0a0; outline-offset: 2px; }
.vx-demo .vx-demo-start {
    position: absolute;
    z-index: 4;
    inset: auto auto 12px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #211508f2;
    color: #ffe5ae;
    border-color: #d1a660;
    box-shadow: 0 3px 14px #0009;
}
.vx-demo .vx-demo-start:hover { background: #e6bd71; color: #211508; }
.vx-demo-steps button { padding: 8px; }
.vx-demo-group { display: grid; gap: 14px; min-width: 0; }
.vn-section .vx-demo { margin: 14px 0 20px; }
.vx-demo-feature { grid-column: 1 / -1; }
.vx-demo-feature .vx-showcase-copy { padding-top: 18px; }
.vx-demo-feature h2 { margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) {
    .vx-demo-pointer { transition: none; }
}

.vx-demo-ripple {
    opacity: 0;
    position: absolute;
    z-index: 4;
    width: clamp(12px, 2.4%, 20px);
    aspect-ratio: 1;
    translate: -50% -50%;
    border: 2px solid #ffe49e;
    border-radius: 50%;
    box-shadow: 0 0 9px #ffc04a;
}
.vx-demo-result {
    display: grid;
    position: absolute;
    z-index: 5;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 2px 10px;
    inset: auto 8% 8%;
    max-width: 340px;
    margin-inline: auto;
    padding: 8px 12px;
    color: #e9f0d9;
    background: #15241a;
    border: 1px solid #6b9868;
    border-radius: 5px;
    box-shadow: 0 3px 22px #0009;
    font-size: clamp(12px, 2.8vw, 16px);
}
.vx-demo-result > span { grid-row: span 2; font-size: 1.25em; color: #aee0a0; }
.vx-demo-result strong { color: inherit; }
.vx-demo-result small { grid-column: 2; color: #bdcfb8; }
.vx-demo-price, .vx-demo-offer, .vx-demo-item, .vx-demo-socket, .vx-demo-brew,
.vx-demo-pass-progress, .vx-demo-pass-claim { display: none; position: absolute; }
.vx-demo:is([data-state="price"],[data-state="price-confirm"]) .vx-demo-price {
    display: flex; align-items: center; left: 19.6%; top: 83.3%; width: 15%; height: 2.6%;
    padding-inline: .3em; background: #1a1510; color: #f9e9c6;
    font-size: clamp(9px, 1.8vw, 15px);
}
.vx-demo[data-state="listed"] .vx-demo-offer {
    display: flex; justify-content: space-between; gap: 4px; left: 8%; top: 28%; width: 80%;
    padding: .22em .45em; box-sizing: border-box;
    background: #282119; color: #f8e4ad; border: 1px solid #8e714a;
    font-size: clamp(9px, 1.9vw, 15px);
}
.vx-demo:is([data-state="equipment"],[data-state="socket"],[data-state="socketed"]) :is(.vx-demo-item,.vx-demo-socket) {
    display: grid;
    place-items: center;
    color: #f6dfae;
    background: #211b13;
    border: 1px solid #b4874a;
    font-size: clamp(9px, 1.9vw, 15px);
}
.vx-demo-item { left: 58%; top: 33%; width: 17%; height: 10%; }
.vx-demo-socket { left: 64%; top: 64%; width: 6%; aspect-ratio: 1; }
.vx-demo-socket img { width: 100%; height: 100%; object-fit: contain; visibility: hidden; }
.vx-demo[data-state="socketed"] .vx-demo-socket img { visibility: visible; }
.vx-demo[data-state="brew"] .vx-demo-brew {
    display: grid; place-items: center; left: 33%; top: 79%; width: 62%; height: 4%;
    color: #e5e9bb; background: #303c22; border: 1px solid #7f9553;
    font-size: clamp(10px, 1.8vw, 16px);
}
.vx-demo-pass-amount {
    position: absolute; left: 5.2%; top: 49.7%; width: 14.9%; height: 7.4%;
    display: grid; place-items: center; color: #f1e1b6; background: #17140f;
    font-size: clamp(9px, 1.8vw, 16px); font-weight: 700; pointer-events: none;
}
.vx-demo:is([data-state="unlocked"],[data-state="claim"],[data-state="claimed"]) .vx-demo-pass-progress {
    display: grid; place-items: center; left: 5.8%; top: 32.9%; width: 88.3%; height: 4.8%; box-sizing: border-box;
    background: #30261a; color: #f3d88f; border-bottom: 4px solid #a88440;
    font-size: clamp(10px, 1.8vw, 16px);
}
.vx-demo:is([data-state="unlocked"],[data-state="claim"]) .vx-demo-pass-claim {
    display: grid; place-items: center; left: 5.4%; top: 61.2%; width: 14.4%; height: 3.6%;
    background: #375333; color: #e3f1cd;
    font-size: clamp(9px, 1.6vw, 15px);
}
@media (prefers-reduced-motion: reduce) {
    .vx-demo-ripple { display: none; }
}


.vx-demo-pass-quest, .vx-demo-pass-claimed { display: none; position: absolute; }
.vx-demo[data-state="quests"] .vx-demo-pass-quest {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    position: absolute; z-index: 3; inset: 23% 5% auto; gap: .4em .8em; padding: .5em .8em;
    color: #f3d88f; background: #211a11; border: 1px solid #936d38;
    font-size: clamp(10px, 2vw, 16px);
}
.vx-demo-pass-quest span { padding: .2em .45em; background: #415236; color: #eaf3d8; }
.vx-demo[data-state="claimed"] .vx-demo-pass-claimed {
    display: grid; place-items: center; left: 5.4%; top: 61.2%; width: 14.4%; height: 3.6%;
    color: #c5dfb5; background: #253120; font-size: clamp(9px, 1.6vw, 15px);
}

/* Independent looping players; a paused panel remains easy to read. */
.vx-demo-stage { cursor: pointer; }
.vx-demo-stage:focus-visible { outline: 2px solid #f6ce77; outline-offset: -3px; }
.vx-demo[data-playing="false"] .vx-demo-focus { box-shadow: 0 0 10px #f6ce7740; }
.vx-demo-controls { justify-content: space-between; }
.vx-demo .vx-demo-toggle { min-width: 105px; }
.vx-demo .vx-demo-enlarge { color: #e6c47e; padding: 8px 3px; font: 600 13px/1.5 Arial, sans-serif; }
.vx-demo .vx-demo-enlarge:focus-visible { outline: 2px solid #ffe0a0; }
.vx-demo .vx-demo-toggle { order: -1; }
.vx-demo[data-demo="autoloot"] .vx-demo-image,
.vx-demo[data-demo="bestiary"] .vx-demo-image,
.vx-demo[data-demo="tasks"] .vx-demo-image { aspect-ratio: auto; }

.vx-demo-click-hint {
    display: none;
    position: absolute;
    z-index: 4;
    align-items: center;
    gap: 7px;
    transform: translate(12px, 12px);
    padding: 5px 9px;
    border: 1px solid #c89b5a;
    border-radius: 5px;
    background: #221810;
    color: #fff0cb;
    font-size: clamp(10px, 1.45vw, 14px);
    font-weight: 700;
    white-space: nowrap;
}
.vx-demo[data-state="right-click"] .vx-demo-click-hint { display: inline-flex; }
.vx-demo-mouse-icon {
    position: relative;
    width: 13px;
    height: 18px;
    box-sizing: border-box;
    border: 1px solid #e2c18c;
    border-radius: 6px;
}
.vx-demo-mouse-icon::after {
    content: "";
    position: absolute;
    top: 1px;
    right: 1px;
    width: 4px;
    height: 6px;
    border-radius: 0 3px 0 0;
    background: #f7c676;
}
