.ew-sm-shell{
    width:100%;
    margin-top:28px;
}

.ew-sm-games-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:24px;
    margin-bottom:18px;
}

.ew-sm-eyebrow{
    color:#a47c46;
    font-size:11px;
    font-weight:900;
    letter-spacing:.22em;
}

.ew-sm-games-head h2{
    margin:8px 0 14px;
    color:#17263d;
    font-size:34px;
    line-height:1.08;
    font-weight:950;
}

.ew-sm-badges{
    display:flex;
    flex-wrap:wrap;
    gap:9px;
}

.ew-sm-badges span{
    border:1px solid #ccdaeb;
    border-radius:999px;
    padding:8px 16px;
    background:#f1f6ff;
    color:#213b61;
    font-size:11px;
    font-weight:900;
    letter-spacing:.09em;
    text-transform:uppercase;
}

.ew-sm-description{
    max-width:780px;
    margin:15px 0 0;
    padding:16px 20px;
    border:1px solid #d9e4ef;
    border-radius:20px;
    color:#687991;
    font-size:15px;
    line-height:1.7;
}

.ew-sm-description strong{
    color:#566a86;
}

.ew-sm-version{
    flex:0 0 auto;
    margin-top:10px;
    border-radius:999px;
    padding:10px 16px;
    background:#fff;
    border:1px solid #d8e1ec;
    color:#17263d;
    font-size:10px;
    font-weight:950;
    letter-spacing:.18em;
}

.ew-sm-frame{
    position:relative;
    overflow:hidden;
    border-radius:28px;
    border:1px solid #18385b;
    background:#07172a;
    box-shadow:0 22px 60px rgba(23,38,61,.18);
}

.ew-sm-hud{
    display:grid;
    grid-template-columns:minmax(0,1fr) 118px 118px 118px;
    min-height:92px;
    background:#0d223b;
    border-bottom:1px solid rgba(255,255,255,.06);
}

.ew-sm-hud-main,
.ew-sm-hud-small{
    box-sizing:border-box;
    padding:15px 18px;
    border-right:1px solid rgba(255,255,255,.06);
}

.ew-sm-hud-main > span,
.ew-sm-hud-small > span{
    display:block;
    color:#82a6c6;
    font-size:10px;
    font-weight:950;
    letter-spacing:.22em;
}

.ew-sm-hud-main strong{
    display:block;
    margin-top:8px;
    color:#fff;
    font-size:19px;
    line-height:1.25;
    font-weight:950;
}

.ew-sm-mission-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.ew-sm-actions{
    display:flex;
    gap:8px;
    flex:0 0 auto;
}

.ew-sm-actions button{
    border-radius:12px;
    padding:10px 14px;
    border:1px solid rgba(255,255,255,.16);
    background:#163451;
    color:#fff;
    font-size:11px;
    font-weight:950;
    cursor:pointer;
}

#ewRbExitButton{
    background:#4a2738;
    border-color:#98536d;
}

.ew-sm-hud-small{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}

.ew-sm-hud-small strong{
    margin-top:6px;
    color:#fff;
    font-size:30px;
    line-height:1;
    font-weight:950;
}

.ew-sm-canvas-wrap{
    position:relative;
    width:100%;
    aspect-ratio:16/9;
    min-height:0;
    overflow:hidden;
    background:#08182b;
}

#ewRobotCanvas{
    display:block;
    width:100%;
    height:100%;
    touch-action:none;
}

.ew-sm-fullscreen-button{
    position:absolute;
    right:14px;
    bottom:14px;
    z-index:30;
    display:flex;
    align-items:center;
    gap:8px;
    min-height:44px;
    border:1px solid #39cbe6;
    border-radius:14px;
    padding:0 14px;
    background:rgba(7,23,42,.88);
    color:#fff;
    cursor:pointer;
    font-size:11px;
    font-weight:950;
}

.ew-sm-fullscreen-button svg{
    width:20px;
    height:20px;
    fill:none;
    stroke:currentColor;
    stroke-width:2;
}

.ew-sm-credit{
    position:absolute;
    left:16px;
    bottom:13px;
    z-index:15;
    color:rgba(255,255,255,.65);
    font-size:10px;
    letter-spacing:.06em;
}

.ew-sm-start,
.ew-sm-dialog,
.ew-sm-final{
    position:absolute;
    inset:0;
    z-index:20;
}

.ew-sm-start{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:30px;
    text-align:center;
    background:
        radial-gradient(circle at 25% 25%, rgba(255,75,160,.20), transparent 28%),
        radial-gradient(circle at 75% 30%, rgba(67,220,255,.19), transparent 30%),
        linear-gradient(145deg, rgba(8,22,44,.97), rgba(24,32,64,.97));
    color:#fff;
}

.ew-sm-start-mark{
    display:flex;
    align-items:center;
    justify-content:center;
    width:64px;
    height:64px;
    border-radius:20px;
    background:linear-gradient(135deg,#ffbd44,#ff6ca8);
    color:#17263d;
    font-size:20px;
    font-weight:950;
    box-shadow:0 0 40px rgba(255,122,176,.35);
}

.ew-sm-start-kicker,
.ew-sm-final-kicker{
    margin-top:20px;
    color:#5ce7ff;
    font-size:10px;
    font-weight:950;
    letter-spacing:.24em;
}

.ew-sm-start h3{
    margin:12px 0 10px;
    font-size:58px;
    line-height:.88;
    font-weight:950;
    letter-spacing:-.03em;
}

.ew-sm-start p{
    margin:0;
    color:#cad7e7;
    font-size:14px;
    line-height:1.65;
}

#ewRbStartButton,
#ewRbSolveButton,
#ewRbDialogContinue{
    margin-top:22px;
    border:0;
    border-radius:16px;
    padding:15px 26px;
    background:linear-gradient(135deg,#ffbd44,#ff6ca8);
    color:#17263d;
    font-size:13px;
    font-weight:950;
    cursor:pointer;
    box-shadow:0 12px 28px rgba(255,111,167,.24);
}

#ewRbStartButton span{
    display:block;
}

#ewRbStartButton small{
    display:block;
    margin-top:4px;
    font-size:9px;
    letter-spacing:.14em;
}

.ew-sm-controls-hint{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:8px;
    margin-top:18px;
}

.ew-sm-controls-hint span{
    border:1px solid rgba(255,255,255,.15);
    border-radius:999px;
    padding:7px 11px;
    color:#9db2ca;
    font-size:9px;
    font-weight:900;
    letter-spacing:.1em;
}

.ew-sm-dialog{
    inset:auto 50% 28px auto;
    transform:translateX(50%);
    width:min(720px, calc(100% - 48px));
    padding:20px 22px;
    border:1px solid #55d9f1;
    border-radius:22px;
    background:rgba(7,23,42,.96);
    box-shadow:0 18px 50px rgba(0,0,0,.35);
    color:#fff;
}

.ew-sm-dialog-role{
    color:#ffcf5c;
    font-size:11px;
    font-weight:950;
    letter-spacing:.18em;
}

.ew-sm-dialog-text{
    margin-top:9px;
    color:#fff;
    font-size:17px;
    line-height:1.5;
    font-weight:800;
}

#ewRbDialogContinue{
    margin-top:14px;
    padding:10px 18px;
}

.ew-sm-final{
    overflow:auto;
    padding:34px;
    background:rgba(7,23,42,.98);
    color:#fff;
}

.ew-sm-final h3{
    margin:10px 0;
    font-size:34px;
    font-weight:950;
}

.ew-sm-final p{
    color:#b9c9da;
}

.ew-sm-final-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
    margin-top:22px;
}

.ew-sm-final-grid label{
    display:flex;
    flex-direction:column;
    gap:8px;
    color:#d9e6f2;
    font-size:12px;
    font-weight:900;
}

.ew-sm-final-grid select{
    width:100%;
    border:1px solid #294c6c;
    border-radius:12px;
    padding:12px;
    background:#102a45;
    color:#fff;
    font-weight:800;
}

#ewRbFinalResult{
    margin-top:18px;
    color:#fff;
    font-size:17px;
    line-height:1.55;
    font-weight:800;
}

.ew-sm-footer{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:22px;
    padding:13px 18px;
    background:#07172a;
    color:#68849e;
    font-size:9px;
    font-weight:950;
    letter-spacing:.15em;
}

@media (max-width:899px),(pointer:coarse){

    .ew-sm-games-head{
        display:block;
    }

    .ew-sm-version{
        display:none;
    }

    .ew-sm-games-head h2{
        font-size:28px;
    }

    .ew-sm-hud{
        grid-template-columns:minmax(0,1fr) 72px 62px 74px;
        min-height:54px;
    }

    .ew-sm-hud-main,
    .ew-sm-hud-small{
        height:54px;
        min-height:54px;
        padding:5px 8px;
    }

    .ew-sm-hud-main > span,
    .ew-sm-hud-small > span{
        font-size:7px;
    }

    .ew-sm-hud-main strong{
        margin-top:2px;
        font-size:14px;
        line-height:1.1;
    }

    .ew-sm-hud-small strong{
        margin-top:3px;
        font-size:22px;
    }

    .ew-sm-actions button{
        padding:6px 8px;
        font-size:8px;
    }

    .ew-sm-frame.ew-sm-mobile-fullscreen,
    .ew-sm-frame:fullscreen,
    .ew-sm-frame:-webkit-full-screen{
        position:fixed!important;
        inset:0!important;
        z-index:2147483000!important;
        display:flex!important;
        flex-direction:column!important;
        width:100vw!important;
        height:100dvh!important;
        max-width:none!important;
        max-height:none!important;
        border:0!important;
        border-radius:0!important;
        margin:0!important;
    }

    body.ew-sm-ios-safari .ew-sm-frame.ew-sm-mobile-fullscreen{
        height:100svh!important;
        max-height:100svh!important;
    }

    .ew-sm-frame.ew-sm-mobile-fullscreen .ew-sm-hud,
    .ew-sm-frame:fullscreen .ew-sm-hud,
    .ew-sm-frame:-webkit-full-screen .ew-sm-hud{
        flex:0 0 54px!important;
    }

    .ew-sm-frame.ew-sm-mobile-fullscreen .ew-sm-canvas-wrap,
    .ew-sm-frame:fullscreen .ew-sm-canvas-wrap,
    .ew-sm-frame:-webkit-full-screen .ew-sm-canvas-wrap{
        flex:1 1 0!important;
        width:100%!important;
        height:auto!important;
        min-height:0!important;
        aspect-ratio:auto!important;
    }

    .ew-sm-frame.ew-sm-mobile-fullscreen #ewRobotCanvas,
    .ew-sm-frame:fullscreen #ewRobotCanvas,
    .ew-sm-frame:-webkit-full-screen #ewRobotCanvas{
        width:100%!important;
        height:100%!important;
    }

    .ew-sm-frame.ew-sm-mobile-fullscreen .ew-sm-footer,
    .ew-sm-frame:fullscreen .ew-sm-footer,
    .ew-sm-frame:-webkit-full-screen .ew-sm-footer{
        display:none!important;
    }

    .ew-sm-frame.ew-sm-mobile-fullscreen .ew-sm-fullscreen-button,
    .ew-sm-frame:fullscreen .ew-sm-fullscreen-button,
    .ew-sm-frame:-webkit-full-screen .ew-sm-fullscreen-button{
        position:fixed!important;
        right:0!important;
        bottom:50%!important;
        transform:translateY(50%)!important;
        width:40px!important;
        height:56px!important;
        padding:0!important;
        justify-content:center!important;
        border-radius:12px 0 0 12px!important;
    }

    .ew-sm-frame.ew-sm-mobile-fullscreen .ew-sm-fullscreen-button span,
    .ew-sm-frame:fullscreen .ew-sm-fullscreen-button span,
    .ew-sm-frame:-webkit-full-screen .ew-sm-fullscreen-button span{
        display:none!important;
    }

    .ew-sm-start h3{
        font-size:42px;
    }

    .ew-sm-dialog{
        bottom:12px;
        width:calc(100% - 72px);
        padding:13px 15px;
    }

    .ew-sm-dialog-text{
        font-size:13px;
    }

    .ew-sm-final{
        padding:18px 54px 18px 18px;
    }

    .ew-sm-final-grid{
        grid-template-columns:1fr;
        gap:8px;
    }
}

/* SCHOOL MYSTERY AUDIO BUTTON */
.ew-sm-audio-toggle{
    width:42px;
    min-width:42px;
    height:38px;
    padding:0 !important;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}
.ew-sm-audio-toggle svg{
    width:19px;
    height:19px;
    fill:none;
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.ew-sm-audio-toggle .ew-sm-audio-off{display:none;}
.ew-sm-audio-toggle.is-muted .ew-sm-audio-on{display:none;}
.ew-sm-audio-toggle.is-muted .ew-sm-audio-off{display:block;}

/* SCHOOL MYSTERY HUD V21 */

.ew-sm-hud-v21{
    width:100%;
    min-height:150px;
    display:grid;
    grid-template-columns:minmax(500px,1fr) 180px 180px 180px;
    background:#071a2d;
    border-top:1px solid #23425d;
    border-bottom:1px solid #1b3952;
    color:#fff;
    overflow:hidden;
}

.ew-sm-hud-v21-main{
    min-width:0;
    padding:18px 24px;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.ew-sm-hud-v21-title span,
.ew-sm-v21-stat span{
    display:block;
    color:#7fa9c9;
    font-size:11px;
    font-weight:900;
    letter-spacing:.22em;
}

.ew-sm-hud-v21-title strong{
    display:block;
    margin-top:6px;
    color:#fff;
    font-size:20px;
    font-weight:900;
}

.ew-sm-hud-v21-actions{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:14px;
}

.ew-sm-v21-icon,
.ew-sm-v21-pause,
.ew-sm-v21-exit{
    height:52px;
    border-radius:15px;
    font-family:inherit;
    font-weight:950;
    cursor:pointer;
}

.ew-sm-v21-icon{
    width:52px;
    display:grid;
    place-items:center;
    background:#0a2943;
}

.ew-sm-v21-icon svg{
    width:25px;
    height:25px;
    fill:none;
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.ew-sm-v21-speak{
    color:#48d7ff;
    border:2px solid #216e8b;
}

.ew-sm-v21-audio{
    color:#ffd84d;
    border:2px solid #7b6923;
}

.ew-sm-v21-pause,
.ew-sm-v21-exit{
    min-width:105px;
    padding:0 20px;
    color:#fff;
    font-size:15px;
    letter-spacing:.06em;
}

.ew-sm-v21-pause{
    background:#123f42;
    border:2px solid #36b89b;
}

.ew-sm-v21-exit{
    background:#381e2b;
    border:2px solid #a6485c;
}

.ew-sm-v21-stat{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    border-left:1px solid #193852;
    background:#081d31;
}

.ew-sm-v21-stat strong{
    margin-top:10px;
    color:#fff;
    font-size:38px;
    line-height:1;
    font-weight:950;
}

.ew-sm-v21-time{
    background:#08242e;
}

.ew-sm-v21-time span{
    color:#6ef0c6;
}

.ew-sm-v21-time strong{
    font-size:56px;
    text-shadow:
        0 0 7px rgba(74,255,207,.45),
        0 0 22px rgba(74,255,207,.22);
}

@media(max-width:1050px){
    .ew-sm-hud-v21{
        grid-template-columns:minmax(400px,1fr) 125px 125px 125px;
    }

    .ew-sm-v21-stat strong{
        font-size:30px;
    }

    .ew-sm-v21-time strong{
        font-size:40px;
    }
}

/* SCHOOL HUD METRO MATCH V22 */
.ew-sm-frame .ew-sm-hud-v21 {
    display: grid;
    grid-template-columns: minmax(0,1fr) 180px 145px 145px;
    min-height: 142px;
    width: 100%;
    align-items: stretch;
    background: #061a30;
    color: #fff;
    border-bottom: 1px solid #23415b;
    box-sizing: border-box;
    overflow: hidden;
}

.ew-sm-frame .ew-sm-hud-v21-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    padding: 16px 24px;
    background: #061a30;
    box-sizing: border-box;
}

.ew-sm-frame .ew-sm-hud-v21-title {
    display: none;
}

.ew-sm-frame .ew-sm-hud-v21-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin: 0;
}

.ew-sm-frame .ew-sm-v21-icon,
.ew-sm-frame .ew-sm-v21-pause,
.ew-sm-frame .ew-sm-v21-exit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 58px;
    border-radius: 17px;
    font-family: inherit;
    font-weight: 950;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s, border-color .15s;
}

.ew-sm-frame .ew-sm-v21-icon {
    width: 58px;
    padding: 0;
}

.ew-sm-frame .ew-sm-v21-icon svg {
    display: block;
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ew-sm-frame .ew-sm-v21-speak {
    background: #082a40;
    border: 1px solid #165b78;
    color: #40d8ff;
}

.ew-sm-frame .ew-sm-v21-audio {
    position: relative;
    background: #272a2c;
    border: 1px solid #6c5d25;
    color: #ffd23f;
}

.ew-sm-frame .ew-sm-v21-audio.is-muted::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 2px;
    background: #ff6464;
    transform: rotate(-45deg);
    border-radius: 4px;
}

.ew-sm-frame .ew-sm-v21-pause {
    min-width: 114px;
    padding: 0 20px;
    background: #123f42;
    border: 1px solid #168d79;
    color: #fff;
    font-size: 16px;
    letter-spacing: .06em;
}

.ew-sm-frame .ew-sm-v21-exit {
    min-width: 94px;
    padding: 0 20px;
    background: #321e30;
    border: 1px solid #a4435a;
    color: #fff;
    font-size: 16px;
    letter-spacing: .06em;
}

.ew-sm-frame .ew-sm-v21-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 12px;
    box-sizing: border-box;
    border-left: 1px solid #102d48;
    background: #081c32;
}

.ew-sm-frame .ew-sm-v21-stat span {
    display: block;
    color: #83a6c7;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .22em;
}

.ew-sm-frame .ew-sm-v21-stat strong {
    display: block;
    margin-top: 10px;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
}

.ew-sm-frame .ew-sm-v21-time {
    background: linear-gradient(145deg,#103d3d,#071b31);
}

.ew-sm-frame .ew-sm-v21-time span {
    color: #84f8c2;
}

.ew-sm-frame .ew-sm-v21-time strong {
    font-size: 64px;
    color: #fff;
    text-shadow: 0 0 18px rgba(101,255,178,.4);
}

@media(max-width:1050px) {
    .ew-sm-frame .ew-sm-hud-v21 {
        grid-template-columns: minmax(0,1fr) 115px 90px 90px;
        min-height: 100px;
    }

    .ew-sm-frame .ew-sm-hud-v21-main {
        padding: 10px;
    }

    .ew-sm-frame .ew-sm-hud-v21-actions {
        gap: 6px;
    }

    .ew-sm-frame .ew-sm-v21-icon {
        width: 40px;
        height: 42px;
    }

    .ew-sm-frame .ew-sm-v21-pause,
    .ew-sm-frame .ew-sm-v21-exit {
        min-width: 58px;
        height: 42px;
        padding: 0 7px;
        font-size: 11px;
    }

    .ew-sm-frame .ew-sm-v21-stat strong {
        font-size: 24px;
    }

    .ew-sm-frame .ew-sm-v21-time strong {
        font-size: 38px;
    }
}

/* SCHOOL HUD V23 - DIRECTIVES LEFT, ACTIONS RIGHT */

.ew-sm-frame .ew-sm-hud-v21-main {
    justify-content: space-between;
    gap: 20px;
}

.ew-sm-frame .ew-sm-hud-v21-title {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

.ew-sm-frame .ew-sm-hud-v21-title span {
    display: block;
    color: #83a6c7;
}

.ew-sm-frame .ew-sm-hud-v21-title strong {
    display: block;
    color: #fff;
    font-size: 17px;
    line-height: 1.4;
}

.ew-sm-frame .ew-sm-hud-v21-actions {
    margin-left: auto;
    flex: 0 0 auto;
}


/* SCHOOL HUD V24 - COMPACT RIGHT SIDE */

.ew-sm-frame .ew-sm-hud-v21{
    grid-template-columns: minmax(0,1fr) 126px 82px 82px;
    min-height: 112px;
}

.ew-sm-frame .ew-sm-hud-v21-main{
    padding: 12px 20px;
    gap: 14px;
}

.ew-sm-frame .ew-sm-hud-v21-title{
    flex: 1 1 auto;
    min-width: 0;
    max-width: 52%;
}

.ew-sm-frame .ew-sm-hud-v21-title span{
    font-size: 10px;
    letter-spacing: .18em;
}

.ew-sm-frame .ew-sm-hud-v21-title strong{
    font-size: 15px;
    line-height: 1.25;
    margin-top: 4px;
}

.ew-sm-frame .ew-sm-hud-v21-actions{
    margin-left: auto;
    gap: 8px;
    flex: 0 0 auto;
}

.ew-sm-frame .ew-sm-v21-icon{
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

.ew-sm-frame .ew-sm-v21-icon svg{
    width: 19px;
    height: 19px;
}

.ew-sm-frame .ew-sm-v21-pause{
    min-width: 88px;
    height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 12px;
}

.ew-sm-frame .ew-sm-v21-exit{
    min-width: 76px;
    height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 12px;
}

.ew-sm-frame .ew-sm-v21-stat{
    padding: 10px 6px;
}

.ew-sm-frame .ew-sm-v21-stat span{
    font-size: 10px;
    letter-spacing: .16em;
}

.ew-sm-frame .ew-sm-v21-time strong{
    font-size: 44px;
}

.ew-sm-frame .ew-sm-v21-stat strong{
    font-size: 22px;
    margin-top: 8px;
}

@media (max-width: 1050px){
    .ew-sm-frame .ew-sm-hud-v21{
        grid-template-columns: minmax(0,1fr) 98px 70px 70px;
        min-height: 92px;
    }

    .ew-sm-frame .ew-sm-hud-v21-main{
        padding: 8px 10px;
        gap: 8px;
    }

    .ew-sm-frame .ew-sm-hud-v21-title{
        max-width: 48%;
    }

    .ew-sm-frame .ew-sm-hud-v21-title strong{
        font-size: 12px;
    }

    .ew-sm-frame .ew-sm-v21-icon{
        width: 34px;
        height: 34px;
    }

    .ew-sm-frame .ew-sm-v21-icon svg{
        width: 16px;
        height: 16px;
    }

    .ew-sm-frame .ew-sm-v21-pause{
        min-width: 68px;
        height: 34px;
        padding: 0 10px;
        font-size: 10px;
    }

    .ew-sm-frame .ew-sm-v21-exit{
        min-width: 58px;
        height: 34px;
        padding: 0 10px;
        font-size: 10px;
    }

    .ew-sm-frame .ew-sm-v21-time strong{
        font-size: 32px;
    }

    .ew-sm-frame .ew-sm-v21-stat strong{
        font-size: 17px;
    }
}

/* SCHOOL HUD V25 - SWAP SPEAK AND AUDIO ICONS */
.ew-sm-frame .ew-sm-hud-v21-actions .ew-sm-v21-speak{
    order: 1;
}
.ew-sm-frame .ew-sm-hud-v21-actions .ew-sm-v21-audio{
    order: 2;
}

/* SCHOOL HUD V26 - CORRECT BUTTON ORDER */
.ew-sm-frame .ew-sm-hud-v21-actions .ew-sm-v21-speak {
    order: 1;
}
.ew-sm-frame .ew-sm-hud-v21-actions .ew-sm-v21-audio {
    order: 2;
}
.ew-sm-frame .ew-sm-hud-v21-actions .ew-sm-v21-pause {
    order: 3;
}
.ew-sm-frame .ew-sm-hud-v21-actions .ew-sm-v21-exit {
    order: 4;
}


/* SCHOOL HUD V27 - STABLE COMPACT */

.ew-sm-frame .ew-sm-hud-v21 {
    min-height: 100px;
}

.ew-sm-frame .ew-sm-hud-v21-main {
    padding-top: 10px;
    padding-bottom: 10px;
}

.ew-sm-frame .ew-sm-hud-v21-actions
.ew-sm-v21-speak {
    order: 0;
}

.ew-sm-frame .ew-sm-hud-v21-actions
.ew-sm-v21-audio {
    order: 0;
}

.ew-sm-frame .ew-sm-hud-v21-actions
.ew-sm-v21-pause {
    order: 0;
}

.ew-sm-frame .ew-sm-hud-v21-actions
.ew-sm-v21-exit {
    order: 0;
}

@media(max-width:1050px) {
    .ew-sm-frame .ew-sm-hud-v21 {
        min-height: 83px;
    }
}
/* SCHOOL V34 - COMPACT THREE BUTTONS */
.ew-sm-hud-v21-actions .ew-sm-v21-pause{
  width:60px!important;min-width:60px!important;
  height:42px!important;padding:0 3px!important;font-size:10px!important;
}
.ew-sm-hud-v21-actions .ew-sm-v21-exit{
  width:53px!important;min-width:53px!important;
  height:42px!important;padding:0 3px!important;font-size:10px!important;
}
.ew-sm-hud-v21-actions .ew-sm-v34-restart{
  order:0;flex:0 0 43px!important;
  width:43px!important;min-width:43px!important;height:42px!important;
  padding:0!important;border-radius:10px;border:1px solid #8fa9ca;
  background:#edf5ff;color:#173b66;font-size:27px;font-weight:900;
  cursor:pointer;line-height:1;
}
.ew-sm-hud-v21-actions .ew-sm-v34-restart:hover{
  background:#dbeafe;
}
.ew-sm-hud-v21-actions{
  column-gap:5px!important;gap:5px!important;
}


/* SCHOOL V38 - TWO SEPARATE MATCHING BUTTONS */

.ew-sm-frame .ew-sm-hud-v21-actions {
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:5px!important;
}

.ew-sm-frame .ew-sm-hud-v21-actions > .ew-sm-v21-speak {
    order:1!important;
}

.ew-sm-frame .ew-sm-hud-v21-actions > .ew-sm-v21-audio {
    order:2!important;
}

.ew-sm-frame .ew-sm-hud-v21-actions > .ew-sm-v37-stack {
    order:3!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    align-items:stretch!important;
    gap:5px!important;
    flex:0 0 72px!important;
    width:72px!important;
    min-width:72px!important;
    max-width:72px!important;
    height:49px!important;
    min-height:49px!important;
    padding:0!important;
    margin:0!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:visible!important;
}

.ew-sm-frame .ew-sm-hud-v21-actions > .ew-sm-v37-stack > button {
    position:static!important;
    order:0!important;
    display:flex!important;
    flex:0 0 22px!important;
    align-items:center!important;
    justify-content:center!important;
    width:72px!important;
    min-width:72px!important;
    max-width:72px!important;
    height:22px!important;
    min-height:22px!important;
    max-height:22px!important;
    padding:0 3px!important;
    margin:0!important;
    border:1px solid #6487af!important;
    border-radius:9px!important;
    background:#173b60!important;
    color:#ffffff!important;
    box-shadow:none!important;
    transform:none!important;
    font:900 10px/1 system-ui,sans-serif!important;
    box-sizing:border-box!important;
    cursor:pointer!important;
}

.ew-sm-frame .ew-sm-hud-v21-actions > .ew-sm-v37-stack > .ew-sm-v34-restart {
    font-size:19px!important;
}

.ew-sm-frame .ew-sm-hud-v21-actions > .ew-sm-v37-stack > button:hover {
    background:#285781!important;
}

.ew-sm-frame .ew-sm-hud-v21-actions > .ew-sm-v37-stack > .ew-sm-v37-separator {
    display:none!important;
}

.ew-sm-frame .ew-sm-hud-v21-actions > .ew-sm-v21-exit {
    order:4!important;
    flex:0 0 53px!important;
    width:53px!important;
    min-width:53px!important;
    height:42px!important;
}


/* SCHOOL MISSION VOCABULARY V41 - METRO SOURCE */
/* EW MISSION VOCABULARY V32 */

.ew-mission-vocabulary {
    margin-top: 24px;
    padding: 26px;
    border: 1px solid rgba(85,237,255,.18);
    border-radius: 20px;
    background:
        radial-gradient(
            circle at top right,
            rgba(85,237,255,.10),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            rgba(7,24,43,.98),
            rgba(12,37,59,.97)
        );
}

.ew-vocabulary-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.ew-vocabulary-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: #f4c84a;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .15em;
}

.ew-vocabulary-heading h2 {
    margin: 0;
    color: #ffffff !important;
    font-size: clamp(22px,2.4vw,30px);
    font-weight: 900;
}

.ew-vocabulary-heading h2 span {
    color: #55edff;
}

.ew-vocabulary-heading p {
    max-width: 850px;
    margin: 10px 0 0;
    color: #d9e8f2;
    font-size: 14px;
    line-height: 1.65;
}

.ew-vocabulary-count {
    padding: 8px 12px;
    border: 1px solid rgba(244,200,74,.35);
    border-radius: 999px;
    color: #f4c84a;
    background: rgba(244,200,74,.08);
    font-size: 11px;
    font-weight: 900;
}

.ew-vocabulary-grid {
    display: grid;
    grid-template-columns:
        repeat(2,minmax(0,1fr));
    gap: 14px;
}

.ew-vocabulary-card {
    padding: 18px;
    border: 1px solid rgba(85,237,255,.14);
    border-radius: 12px;
    background: rgba(255,255,255,.055);
    backdrop-filter: blur(10px);
}

.ew-vocabulary-name {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
}

.ew-vocabulary-translation {
    margin-top: 5px;
    color: #55edff;
    font-size: 13px;
    font-weight: 800;
}

.ew-vocabulary-clue,
.ew-vocabulary-example {
    margin-top: 14px;
    padding-top: 12px;
    border-top:
        1px solid rgba(255,255,255,.08);
}

.ew-vocabulary-clue strong,
.ew-vocabulary-example strong {
    display: block;
    margin-bottom: 6px;
    color: #f4c84a;
    font-size: 11px;
    font-weight: 900;
}

.ew-vocabulary-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
}

.ew-vocabulary-clue p {
    color: #e9f3f8;
}

.ew-vocabulary-en {
    color: #fff;
}

.ew-vocabulary-tr {
    margin-top: 5px !important;
    color: #a7edf2;
    font-weight: 700;
}

@media (max-width:720px) {
    .ew-mission-vocabulary {
        padding: 18px;
    }

    .ew-vocabulary-heading {
        flex-direction: column;
    }

    .ew-vocabulary-grid {
        grid-template-columns: 1fr;
    }
}



/* SCHOOL VOCABULARY - TITLE AND SPACING */
.ew-sm-vocabulary {
    margin-top:24px;
}

.ew-sm-vocabulary .ew-vocabulary-heading h2 {
    color:#17263d;
    opacity:1;
    visibility:visible;
}

.ew-sm-vocabulary .ew-vocabulary-heading h2 span {
    color:#64748b;
    opacity:1;
    visibility:visible;
}

.ew-sm-vocabulary .ew-vocabulary-grid {
    min-width:0;
}

/* SCHOOL V43 - VISIBLE MISSION PROGRESS */
.ew-sm-frame .ew-sm-v43-mission-row {
    display:flex!important;
    align-items:baseline!important;
    gap:10px!important;
    min-width:0!important;
    width:100%;
}

.ew-sm-frame .ew-sm-v43-mission-row #ewRbStep {
    display:inline-block!important;
    position:static!important;
    flex:0 0 auto!important;
    color:#f3fbff!important;
    font-size:inherit!important;
    font-weight:950!important;
    line-height:1.25!important;
    letter-spacing:-.035em!important;
    white-space:nowrap!important;
    visibility:visible!important;
    opacity:1!important;
}

.ew-sm-frame .ew-sm-v43-mission-row #ewRbMission {
    display:block!important;
    flex:1 1 auto!important;
    min-width:0!important;
    margin:0!important;
}

/* SCHOOL PORTRAIT V44
   Only narrow portrait viewports; landscape is untouched. */
@media screen and (max-width:899px) and (orientation:portrait) {

  .ew-sm-frame .ew-sm-hud-v21 {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-rows:auto auto!important;
    gap:1px!important;
    height:auto!important;
    min-height:0!important;
  }

  .ew-sm-frame .ew-sm-hud-v21-main {
    grid-column:1 / -1!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:9px!important;
    width:100%!important;
    min-width:0!important;
    padding:10px 12px!important;
    box-sizing:border-box!important;
  }

  .ew-sm-frame .ew-sm-hud-v21-title {
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    text-align:left!important;
  }

  .ew-sm-frame .ew-sm-v43-mission-row {
    display:flex!important;
    gap:8px!important;
    flex-wrap:nowrap!important;
    align-items:flex-start!important;
    width:100%!important;
  }

  .ew-sm-frame .ew-sm-v43-mission-row #ewRbMission {
    display:block!important;
    min-width:0!important;
    overflow:visible!important;
    white-space:normal!important;
    text-overflow:clip!important;
    line-height:1.3!important;
    font-size:12px!important;
  }

  .ew-sm-frame .ew-sm-hud-v21-actions {
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    justify-content:center!important;
    align-items:center!important;
    gap:7px!important;
    margin:0!important;
    padding:0!important;
    box-sizing:border-box!important;
  }

  .ew-sm-frame .ew-sm-hud-v21-actions > .ew-sm-v21-speak,
  .ew-sm-frame .ew-sm-hud-v21-actions > .ew-sm-v21-audio {
    flex:0 0 36px!important;
    width:36px!important;
    min-width:36px!important;
    height:36px!important;
    margin:0!important;
  }

  .ew-sm-frame .ew-sm-hud-v21-actions > .ew-sm-v37-stack {
    flex:0 0 66px!important;
    width:66px!important;
    min-width:66px!important;
    max-width:66px!important;
    height:58px!important;
    min-height:58px!important;
    gap:8px!important;
  }

  .ew-sm-frame .ew-sm-hud-v21-actions > .ew-sm-v21-exit {
    flex:0 0 53px!important;
    width:53px!important;
    min-width:53px!important;
    height:42px!important;
    margin:0!important;
  }

  .ew-sm-frame .ew-sm-hud-v21 > .ew-sm-v21-stat {
    grid-column:auto!important;
    min-width:0!important;
    padding:7px 3px!important;
    text-align:center!important;
  }

  .ew-sm-frame .ew-sm-hud-v21 > .ew-sm-v21-stat span {
    font-size:9px!important;
  }

  .ew-sm-frame .ew-sm-hud-v21 > .ew-sm-v21-stat strong {
    margin-top:3px!important;
    font-size:19px!important;
    line-height:1.15!important;
  }

  .ew-sm-frame.ew-sm-mobile-fullscreen,
  .ew-sm-frame:fullscreen,
  .ew-sm-frame:-webkit-full-screen {
    display:flex!important;
    flex-direction:column!important;
    height:100dvh!important;
    max-height:100dvh!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  .ew-sm-frame.ew-sm-mobile-fullscreen .ew-sm-hud-v21,
  .ew-sm-frame:fullscreen .ew-sm-hud-v21,
  .ew-sm-frame:-webkit-full-screen .ew-sm-hud-v21 {
    flex:0 0 auto!important;
  }

  .ew-sm-frame.ew-sm-mobile-fullscreen .ew-sm-canvas-wrap,
  .ew-sm-frame:fullscreen .ew-sm-canvas-wrap,
  .ew-sm-frame:-webkit-full-screen .ew-sm-canvas-wrap {
    display:block!important;
    flex:1 1 auto!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    overflow:hidden!important;
  }

  .ew-sm-frame.ew-sm-mobile-fullscreen #ewRobotCanvas,
  .ew-sm-frame:fullscreen #ewRobotCanvas,
  .ew-sm-frame:-webkit-full-screen #ewRobotCanvas {
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-height:100%!important;
    object-fit:fill!important;
  }

  .ew-sm-frame.ew-sm-mobile-fullscreen .ew-sm-footer,
  .ew-sm-frame:fullscreen .ew-sm-footer,
  .ew-sm-frame:-webkit-full-screen .ew-sm-footer {
    display:none!important;
  }
}

/* EW GAME STORY INTRO V45 - OUTSIDE THE GAME FRAME */
.ew-game-story-v45 {
    position:relative;
    margin:18px 0 20px;
    padding:23px 26px;
    border:1px solid #cad8e8;
    border-radius:20px;
    background:linear-gradient(125deg,#102a47,#193e62);
    color:#fff;
    box-shadow:0 12px 32px rgba(14,39,69,.12);
    box-sizing:border-box;
}
.ew-game-story-v45 .ew-story-kicker {
    display:block;
    margin-bottom:8px;
    color:#f1c978;
    font-size:11px;
    font-weight:900;
    letter-spacing:.13em;
}
.ew-game-story-v45 h3 {
    margin:0 0 12px;
    color:#fff;
    font-size:clamp(23px,3vw,34px);
    line-height:1.15;
    font-weight:900;
}
.ew-game-story-v45 p {
    max-width:850px;
    margin:0;
    color:#e4edf7;
    font-size:15px;
    line-height:1.7;
}
.ew-game-story-v45 .ew-story-goal {
    display:inline-block;
    margin-top:16px;
    padding:8px 12px;
    border:1px solid rgba(241,201,120,.35);
    border-radius:10px;
    background:rgba(241,201,120,.10);
    color:#f8dfaa;
    font-size:12px;
    font-weight:800;
}
@media screen and (max-width:600px) {
    .ew-game-story-v45 {
        padding:17px;
        border-radius:15px;
        margin:14px 0;
    }
    .ew-game-story-v45 p {
        font-size:13px;
        line-height:1.55;
    }
    .ew-game-story-v45 .ew-story-goal {
        font-size:11px;
        line-height:1.5;
    }
}
/* EW GAME COVER V46 - ONLY INTRO SECTION */
.ew-game-story-v45.ew-game-cover-v46 {
    display:block;
    overflow:hidden;
    padding:0;
    border:0;
    border-radius:20px;
    background:#102a47;
    box-shadow:0 12px 32px rgba(14,39,69,.12);
}
.ew-game-story-v45.ew-game-cover-v46 img {
    display:block;
    width:100%;
    height:auto;
    aspect-ratio:16/9;
    object-fit:cover;
}
@media (max-width:600px) {
    .ew-game-story-v45.ew-game-cover-v46 {
        border-radius:14px;
    }
}

/* GAME START COVER V47 - START SCREEN ONLY */

#ewRbStartPanel {
  background-image:url('/games/a1-ai-robot-job-academy/cover.svg')!important;
  background-color:#071426!important;
  background-size:contain!important;
  background-position:center center!important;
  background-repeat:no-repeat!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  justify-content:flex-end!important;
  align-items:center!important;
  padding:12px 12px 25px!important;
  box-sizing:border-box!important;
}
#ewRbStartPanel > :not(#ewRbStartButton) {
  display:none!important;
}
#ewRbStartPanel > #ewRbStartButton {
  display:block!important;
  position:relative!important;
  z-index:5!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:180px!important;
  max-width:90%!important;
  min-height:48px!important;
  margin:0 auto!important;
  padding:12px 22px!important;
  border:2px solid #ffdc78!important;
  border-radius:14px!important;
  background:linear-gradient(135deg,#efaa26,#dc632c)!important;
  color:#ffffff!important;
  box-shadow:0 5px 24px rgba(0,0,0,.6)!important;
  transform:none!important;
  font-size:14px!important;
  font-weight:900!important;
  cursor:pointer!important;
}
#ewRbStartPanel > #ewRbStartButton span,
#ewRbStartPanel > #ewRbStartButton small {
  color:#ffffff!important;
}
#ewRbStartPanel > #ewRbStartButton small {
  display:none!important;
}
@media screen and (max-width:899px) and (orientation:portrait) {
  #ewRbStartPanel {
    padding:10px 10px 16px!important;
  }
  #ewRbStartPanel > #ewRbStartButton {
    min-width:155px!important;
    min-height:43px!important;
    font-size:12px!important;
  }
}

/* START CENTER V48 - BOTH ORIENTATIONS */

#ewRbStartPanel {
    justify-content:center!important;
    align-items:center!important;
}
#ewRbStartPanel > button {
    margin:0 auto!important;
}

/* SCHOOL DIALOG CENTER V54
   All teacher answers appear in the same central position.
   Scoped to the teacher dialogue; start/final panels unchanged.
*/

.ew-sm-canvas-wrap > #ewRbDialog:not([hidden]) {
    position:absolute !important;

    top:50% !important;
    left:50% !important;
    right:auto !important;
    bottom:auto !important;
    inset:50% auto auto 50% !important;

    transform:translate(-50%,-50%) !important;

    box-sizing:border-box !important;
    width:min(720px, calc(100% - 32px)) !important;
    max-width:calc(100% - 32px) !important;
    max-height:calc(100% - 32px) !important;

    overflow-x:hidden !important;
    overflow-y:auto !important;

    margin:0 !important;
    padding:20px 22px !important;

    z-index:100 !important;
    overscroll-behavior:contain;
}

.ew-sm-canvas-wrap > #ewRbDialog:not([hidden])
.ew-sm-dialog-text {
    overflow-wrap:anywhere;
    word-break:normal;
}

@media screen and (max-width:899px) {
    .ew-sm-canvas-wrap > #ewRbDialog:not([hidden]) {
        inset:50% auto auto 50% !important;
        transform:translate(-50%,-50%) !important;

        width:calc(100% - 24px) !important;
        max-width:calc(100% - 24px) !important;
        max-height:calc(100% - 24px) !important;

        padding:14px 16px !important;
    }

    .ew-sm-canvas-wrap > #ewRbDialog:not([hidden])
    .ew-sm-dialog-text {
        font-size:clamp(12px, 2.5vw, 16px) !important;
        line-height:1.45 !important;
    }
}
