body.bit101-games [data-scene-game="tunnel"]{
    isolation:isolate;
    background:#dce3e4;
}

body.bit101-games .game-shell[data-game-id="tunnel"] [data-bit101-numeral-enhanced="true"]{
    font-variant-numeric:normal;
}

body.bit101-games .game-shell[data-game-id="tunnel"] .bit101-numeral-source{
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0 0 0 0);
    white-space:nowrap;
    border:0;
}

body.bit101-games .game-shell[data-game-id="tunnel"] .bit101-numeral-visual{
    display:inline-flex;
    align-items:baseline;
    justify-content:center;
    white-space:pre-wrap;
}

body.bit101-games .game-shell[data-game-id="tunnel"] .game-expression .bit101-numeral-run{
    font-size:1.18em;
    color:#f3ffff;
    filter:drop-shadow(0 2px 1px rgba(0,0,0,.34)) drop-shadow(0 0 8px rgba(111,227,215,.5));
}

body.bit101-games .game-shell[data-game-id="tunnel"] .game-expression{
    width:1px;
    height:1px;
    min-width:0!important;
    min-height:0!important;
    margin:-1px;
    padding:0!important;
    overflow:hidden;
    clip:rect(0 0 0 0);
    clip-path:inset(50%);
    border:0!important;
    background:none!important;
    box-shadow:none!important;
    color:transparent;
    text-shadow:none;
    white-space:nowrap;
}

body.bit101-games .game-shell[data-game-id="tunnel"] .game-expression::before,
body.bit101-games .game-shell[data-game-id="tunnel"] .game-expression::after{
    content:none;
}

body.bit101-games .game-shell[data-game-id="tunnel"] .game-status .bit101-numeral-run,
body.bit101-games .game-shell[data-game-id="tunnel"] .game-renderer-fallback .bit101-numeral-run{
    color:#fff;
    filter:drop-shadow(0 1px 1px rgba(0,0,0,.38));
}

body.bit101-games .game-shell[data-game-id="tunnel"] .game-tutorial__equation .bit101-numeral-run,
body.bit101-games .game-shell[data-game-id="tunnel"] .game-result__card .bit101-numeral-run{
    color:#095f66;
    filter:drop-shadow(0 1px 0 rgba(255,255,255,.82));
}

/* The Tunnel selector preview is the visual authority for this three-lane control family. */
body.bit101-games .game-shell[data-game-id="tunnel"] .game-steering{
    right:max(clamp(24px,2.6vw,40px),env(safe-area-inset-right));
    left:max(clamp(24px,2.6vw,40px),env(safe-area-inset-left));
}

body.bit101-games .game-shell[data-game-id="tunnel"] .game-steer{
    width:clamp(82px,13vw,200px);
    height:clamp(82px,13vw,200px);
}

body.bit101-games .game-shell[data-game-id="tunnel"] .game-direction-icon{
    width:100%;
    height:100%;
}

@media (hover:hover){
    body.bit101-games .game-shell[data-game-id="tunnel"] .game-steer:not(:disabled):hover{
        filter:brightness(1.1);
    }
}

body.bit101-games .game-shell[data-game-id="tunnel"] .game-steer:not(:disabled):active{
    filter:brightness(.94);
}

@media(max-height:420px) and (orientation:landscape){
    body.bit101-games .game-shell[data-game-id="tunnel"] .game-steer{
        width:clamp(72px,13vw,104px);
        height:clamp(72px,13vw,104px);
    }
}

body.bit101-games .tunnel-scene{
    position:absolute;
    inset:0;
    overflow:hidden;
    background:
        radial-gradient(circle at 50% 42%,rgba(255,255,255,.92),rgba(226,232,233,.72) 52%,rgba(177,191,195,.84));
}

body.bit101-games .tunnel-scene__canvas{
    position:absolute;
    inset:0;
    display:block;
    width:100%;
    height:100%;
    contain:strict;
    touch-action:none;
}

body.bit101-games .tunnel-scene__canvas[hidden]{
    display:none;
}

body.bit101-games .tunnel-scene__fallback{
    position:absolute;
    z-index:1;
    left:50%;
    bottom:max(88px,calc(env(safe-area-inset-bottom) + 72px));
    display:grid;
    width:min(286px,calc(100% - 48px));
    translate:-50% 0;
    gap:2px;
    padding:10px 14px;
    border:1px solid rgba(255,255,255,.68);
    border-radius:18px;
    background:rgba(230,236,237,.78);
    box-shadow:0 12px 34px rgba(40,55,59,.12);
    color:#33474d;
    text-align:center;
    -webkit-backdrop-filter:blur(9px);
    backdrop-filter:blur(9px);
    pointer-events:none;
}

body.bit101-games .tunnel-scene__fallback[hidden]{
    display:none;
}

body.bit101-games .tunnel-scene__fallback span{
    font-size:12px;
    font-weight:800;
    letter-spacing:.04em;
}

body.bit101-games .tunnel-scene__fallback small{
    color:#607176;
    font-size:11px;
}

body.bit101-games [data-scene-game="tunnel"][data-renderer-status="context-lost"] .tunnel-scene,
body.bit101-games [data-scene-game="tunnel"][data-renderer-status="fallback"] .tunnel-scene{
    background:
        repeating-radial-gradient(circle at 50% 48%,transparent 0 34px,rgba(71,91,97,.08) 35px 36px),
        linear-gradient(160deg,#f2f5f5,#cfd9da);
}

body.bit101-games [data-scene-game="tunnel"][data-paused="true"] .tunnel-scene__canvas{
    filter:saturate(.45) brightness(.96);
}

@media(max-width:560px){
    body.bit101-games .tunnel-scene__fallback{
        bottom:max(104px,calc(env(safe-area-inset-bottom) + 88px));
        width:min(248px,calc(100% - 40px));
        padding:9px 12px;
    }
}

@media(max-height:420px) and (orientation:landscape){
    body.bit101-games .tunnel-scene__fallback{
        bottom:max(56px,calc(env(safe-area-inset-bottom) + 44px));
        width:min(240px,calc(100% - 32px));
        padding:7px 10px;
    }
}

@media(prefers-reduced-motion:reduce){
    body.bit101-games .tunnel-scene__canvas{
        transition:none;
    }
}
