.voxel-3d-page {
    --voxel-mint: #67f0c7;
}

.voxel-stage--3d {
    background: #7bc3e7;
    box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 0 90px rgba(63, 164, 205, .18);
}

#voxel3dCanvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.voxel-shade--3d {
    background:
        linear-gradient(rgba(3,7,17,.46), transparent 15%, transparent 78%, rgba(2,4,11,.85)),
        radial-gradient(ellipse at center, transparent 63%, rgba(2,4,12,.3));
}

.voxel-brand__cube--3d {
    transform: rotate(30deg) skew(-4deg, -4deg) scale(.82);
    box-shadow: inset 0 -11px #6d4a31, 6px 7px 0 rgba(0,0,0,.28);
}

.voxel-brand__cube--3d::before,
.voxel-brand__cube--3d::after {
    position: absolute;
    content: "";
}

.voxel-brand__cube--3d::before {
    top: -9px;
    left: 3px;
    width: 31px;
    height: 12px;
    border: 2px solid #b6f38b;
    background: #86c65d;
    transform: skewX(-37deg);
}

.voxel-brand__cube--3d::after {
    top: -4px;
    right: -12px;
    width: 12px;
    height: 34px;
    border: 2px solid #47783a;
    background: #507f39;
    transform: skewY(-50deg);
}

.voxel-avatar--3d {
    border-color: #79efd1;
    box-shadow: inset 0 9px #3c2b24, 3px 3px 0 rgba(0,0,0,.3), 0 0 12px rgba(103,240,199,.18);
}

.voxel-minimap--3d {
    border-color: rgba(101, 240, 203, .28);
}

.voxel-camera-mode {
    position: absolute;
    z-index: 6;
    top: calc(26% + 49px);
    left: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 6px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 2px;
    background: rgba(5,9,18,.68);
    box-shadow: 2px 3px 0 rgba(0,0,0,.24);
    backdrop-filter: blur(6px);
}

.voxel-camera-mode span {
    color: var(--voxel-mint);
    font-size: 5px;
    font-weight: 950;
}

.voxel-camera-mode strong {
    color: #aab6cf;
    font-size: 5px;
    letter-spacing: .06em;
}

.voxel-target--3d {
    opacity: .74;
}

.voxel-target--3d::before,
.voxel-target--3d::after {
    background: var(--voxel-mint);
}

.voxel-first-person-tool {
    position: absolute;
    z-index: 5;
    right: 8%;
    bottom: 22%;
    width: 42px;
    height: 105px;
    transform: rotate(-18deg);
    transform-origin: 50% 100%;
    filter: drop-shadow(6px 9px 4px rgba(0,0,0,.32));
    pointer-events: none;
}

.voxel-first-person-tool::before {
    position: absolute;
    right: 4px;
    bottom: 0;
    width: 29px;
    height: 72px;
    content: "";
    background: #bf8262;
    box-shadow: inset -9px 0 #8b5847, inset 0 -24px #287b78;
}

.voxel-first-person-tool i {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 19px;
    width: 8px;
    height: 76px;
    background: #6f492d;
    box-shadow: inset -3px 0 #49321f;
}

.voxel-first-person-tool b {
    position: absolute;
    z-index: 3;
    top: -3px;
    left: 1px;
    width: 46px;
    height: 13px;
    background: #88949d;
    box-shadow: inset 0 -5px #555f66;
}

.voxel-stage[data-held-item="map"] .voxel-first-person-tool i,
.voxel-stage[data-held-item="map"] .voxel-first-person-tool b,
.voxel-stage[data-held-item="food"] .voxel-first-person-tool i,
.voxel-stage[data-held-item="food"] .voxel-first-person-tool b {
    display: none;
}

.voxel-stage[data-held-item="map"] .voxel-first-person-tool::after {
    position: absolute;
    top: 12px;
    left: -5px;
    width: 55px;
    height: 42px;
    border: 4px solid #d9c591;
    content: "";
    background:
        linear-gradient(135deg, transparent 42%, #5e9c65 43% 57%, transparent 58%),
        #b9d79a;
    box-shadow: inset 0 0 0 3px rgba(74,93,58,.28);
}

.voxel-stage[data-held-item="sword"] .voxel-first-person-tool b {
    top: -26px;
    left: 18px;
    width: 12px;
    height: 55px;
}

.voxel-stage[data-held-item="wood"] .voxel-first-person-tool b {
    width: 36px;
    height: 30px;
    background: #aa6b38;
    box-shadow: inset -8px -7px #72452d;
}

.voxel-stage[data-held-item="axe"] .voxel-first-person-tool b {
    left: 18px;
    width: 30px;
}

.voxel-stage[data-held-item="food"] .voxel-first-person-tool::after {
    position: absolute;
    top: 8px;
    left: 5px;
    width: 36px;
    height: 36px;
    border-radius: 42% 48% 45% 50%;
    content: "";
    background: #d75645;
    box-shadow: inset -8px -6px #933b37;
}

.voxel-stage[data-held-item="bed"] .voxel-first-person-tool {
    opacity: 0;
}

.voxel-scene-transition {
    position: absolute;
    z-index: 8;
    inset: 0;
    background: #050a12;
    opacity: 0;
    pointer-events: none;
}

.voxel-stage.is-world-transitioning .voxel-scene-transition {
    animation: voxel-world-transition .7s ease-in-out;
}

@keyframes voxel-world-transition {
    0%, 52% { opacity: 1; }
    100% { opacity: 0; }
}

.voxel-stage.is-paused .voxel-first-person-tool,
.voxel-stage.is-world-transitioning .voxel-first-person-tool {
    opacity: 0;
}

.voxel-audio-gate--3d {
    background:
        radial-gradient(circle at 50% 43%, rgba(72, 211, 190, .15), transparent 31%),
        rgba(3, 8, 16, .92);
}

.voxel-webgl-error {
    position: absolute;
    z-index: 40;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
    background: #080d17;
    text-align: center;
}

.voxel-webgl-error[hidden] {
    display: none;
}

.voxel-webgl-error strong {
    font-size: 1.4rem;
    text-transform: uppercase;
}

.voxel-webgl-error p {
    max-width: 340px;
    color: #8e9bb5;
    font-family: system-ui, sans-serif;
    font-size: .8rem;
    line-height: 1.5;
}

.voxel-webgl-error a {
    padding: .7rem 1rem;
    border: 2px solid #d9fff1;
    color: #07130f;
    background: var(--voxel-mint);
    font-size: 8px;
    font-weight: 950;
    text-decoration: none;
}

.voxel-death--3d {
    background:
        radial-gradient(circle, rgba(216, 56, 67, .18), transparent 40%),
        rgba(37, 5, 12, .9);
}

@media (max-width: 390px) {
    .voxel-camera-mode {
        transform: scale(.9);
        transform-origin: left top;
    }
}
