/* Monkey Type — jungle sorting lab */

.game-mode-monkey-type {
    min-height: 360px;
    background: linear-gradient(180deg, #134e4a 0%, #115e59 28%, #1c1917 72%, #0f172a 100%);
}

.game-mode-monkey-type .game-danger-line,
.game-mode-monkey-type .game-base-line {
    display: none;
}

.game-mode-monkey-type .game-stage-prompt,
.game-app.game-id-monkey-type .game-stage-prompt {
    display: none !important;
}

.mt-scene {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* —— Background —— */
.mt-canopy {
    position: absolute;
    inset: 0 0 55% 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(74, 222, 128, 0.25), transparent 55%),
        radial-gradient(ellipse 70% 50% at 80% 5%, rgba(52, 211, 153, 0.2), transparent 50%),
        linear-gradient(180deg, #065f46, transparent);
}

.mt-vines {
    position: absolute;
    top: 0;
    left: 0;
    width: 38%;
    height: 45%;
    opacity: 0.35;
    background: repeating-linear-gradient(
        105deg,
        transparent,
        transparent 18px,
        rgba(34, 197, 94, 0.15) 18px,
        rgba(34, 197, 94, 0.15) 22px
    );
}

.mt-leaf {
    position: absolute;
    width: 18px;
    height: 10px;
    background: #22c55e;
    border-radius: 0 80% 0 80%;
    opacity: 0.55;
    animation: mt-leaf-drift 8s linear infinite;
}

.mt-leaf-a { top: 12%; left: 10%; animation-duration: 9s; }
.mt-leaf-b { top: 22%; left: 70%; animation-duration: 11s; animation-delay: -3s; transform: scale(1.3); }
.mt-leaf-c { top: 8%; left: 45%; animation-duration: 7s; animation-delay: -1s; transform: rotate(40deg); }

.mt-lab-floor {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32%;
    background: linear-gradient(180deg, #44403c, #292524);
    box-shadow: inset 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* —— Workbench (left) —— */
.mt-workbench {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 46%;
    height: 100%;
    z-index: 3;
}

.mt-desk-top {
    position: absolute;
    left: 6%;
    bottom: 14%;
    width: 78%;
    height: 16%;
    background: linear-gradient(180deg, #b45309, #92400e);
    border-radius: 8px 8px 4px 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.mt-keyboard-lights {
    display: none;
}

.mt-keyboard {
    position: absolute;
    left: 10%;
    bottom: 15%;
    width: 58%;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    padding: 4px 6px;
    background: #1c1917;
    border-radius: 5px;
    box-shadow: 0 2px 0 #0c0a09, 0 0 12px rgba(56, 189, 248, 0.2);
    z-index: 2;
}

.mt-key {
    width: 10px;
    height: 8px;
    border-radius: 2px;
    background: #44403c;
    border: 1px solid #57534e;
    transition: background 0.08s, transform 0.08s, box-shadow 0.08s;
}

.mt-key.is-lit {
    background: #fde047;
    border-color: #ca8a04;
    transform: translateY(1px) scale(0.92);
    box-shadow: 0 0 6px rgba(253, 224, 71, 0.7);
}

.mt-monitor {
    position: absolute;
    left: 8%;
    bottom: 38%;
    width: 72%;
    z-index: 2;
}

.mt-monitor-bezel {
    position: relative;
    min-height: 132px;
    background: #0f172a;
    border: 4px solid #475569;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(148, 163, 184, 0.15);
    overflow: hidden;
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mt-monitor-bezel.is-glitch {
    animation: mt-monitor-glitch 0.42s steps(2);
}

.mt-monitor-scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(34, 197, 94, 0.04) 3px,
        rgba(34, 197, 94, 0.04) 4px
    );
    pointer-events: none;
}

.mt-monitor-queue {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
}

.mt-queue-head {
    font-size: 0.52rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 3px;
}

.mt-queue-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 52px;
    overflow-y: auto;
}

.mt-queue-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.6);
    font-size: 0.58rem;
    line-height: 1.2;
}

.mt-queue-dot {
    display: none;
}

.mt-queue-monkey {
    flex-shrink: 0;
    font-size: 0.85rem;
    line-height: 1;
}

.mt-queue-owner {
    flex-shrink: 0;
    font-size: 0.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    min-width: 2.2em;
}

.mt-queue-red .mt-queue-owner,
.mt-queue-miko .mt-queue-owner { color: #fbbf24; }
.mt-queue-green .mt-queue-owner,
.mt-queue-bongo .mt-queue-owner { color: #a3e635; }
.mt-queue-blue .mt-queue-owner,
.mt-queue-kong .mt-queue-owner { color: #c4b5fd; }

.mt-queue-banana {
    flex-shrink: 0;
    font-size: 0.7rem;
}

.mt-queue-word {
    flex: 1;
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mt-queue-meta {
    flex-shrink: 0;
    font-size: 0.5rem;
    color: #64748b;
    font-weight: 700;
}

.mt-queue-item.is-active {
    background: rgba(234, 179, 8, 0.18);
    box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.45);
}

.mt-queue-item.is-active .mt-queue-word {
    color: #fef08a;
}

.mt-queue-item.is-launching {
    opacity: 0.55;
}

.mt-queue-item.is-launching .mt-queue-word {
    text-decoration: line-through;
    color: #4ade80;
}

.mt-queue-item.is-done .mt-queue-word {
    color: #4ade80;
}

.mt-queue-empty {
    font-size: 0.55rem;
    color: #64748b;
    font-style: italic;
    padding: 2px 4px;
}

.mt-monitor-active {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(51, 65, 85, 0.8);
    padding-top: 4px;
}

.mt-monitor-label {
    font-size: 0.48rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    margin-bottom: 2px;
}

.mt-monitor-word {
    position: relative;
    font-family: 'Fira Code', monospace;
    font-size: clamp(0.6rem, 1.6vw, 0.78rem);
    font-weight: 700;
    text-align: center;
    min-height: 1.2em;
    color: #94a3b8;
    z-index: 1;
}

.mt-m-done { color: #4ade80; }
.mt-m-next {
    color: #fef08a;
    background: rgba(234, 179, 8, 0.35);
    padding: 0 2px;
    border-radius: 2px;
    animation: mt-m-blink 0.7s step-end infinite;
}
.mt-m-rest { color: #64748b; }

.mt-monitor-bar {
    position: relative;
    margin-top: 4px;
    height: 5px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 3px;
    overflow: hidden;
}

.mt-monitor-bar span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 3px;
    transition: width 0.12s ease-out;
}

.mt-monitor-neck {
    width: 26%;
    height: 16px;
    margin: 0 auto;
    background: linear-gradient(180deg, #64748b, #475569);
    border-radius: 0 0 6px 6px;
}

/* Hero monkey at computer */
.mt-monkey-hero {
    position: absolute;
    left: 18%;
    bottom: 22%;
    width: 102px;
    height: 118px;
    z-index: 4;
    transform-origin: center bottom;
}

.mt-monkey-chair {
    position: absolute;
    left: 8%;
    bottom: 0;
    width: 84%;
    height: 22%;
    background: linear-gradient(180deg, #57534e, #292524);
    border-radius: 8px 8px 4px 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.mt-monkey-chair::before {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    top: -28%;
    height: 32%;
    background: #44403c;
    border-radius: 6px 6px 0 0;
}

.mt-monkey-body {
    position: absolute;
    left: 22%;
    bottom: 8%;
    width: 46%;
    height: 38%;
    background: radial-gradient(circle at 40% 30%, #d97706, #92400e);
    border-radius: 45% 45% 40% 40%;
}

.mt-monkey-tail {
    position: absolute;
    left: 8%;
    bottom: 18%;
    width: 28px;
    height: 28px;
    border: 5px solid transparent;
    border-bottom-color: #92400e;
    border-radius: 50%;
    transform: rotate(-35deg);
    animation: mt-tail-sway 2.8s ease-in-out infinite;
}

.mt-monkey-head {
    position: absolute;
    left: 18%;
    bottom: 38%;
    width: 58%;
    height: 48%;
}

.mt-monkey-face {
    font-size: clamp(2.2rem, 5.5vw, 3rem);
    display: block;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
    animation: mt-monkey-idle 2.6s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.mt-monkey-blink {
    position: absolute;
    left: 50%;
    top: 42%;
    width: 38%;
    height: 8%;
    transform: translateX(-50%);
    background: #78350f;
    border-radius: 50%;
    opacity: 0;
    z-index: 3;
    animation: mt-monkey-blink 4.5s ease-in-out infinite;
}

.mt-monkey-ear {
    position: absolute;
    top: 8%;
    width: 22%;
    height: 28%;
    background: #b45309;
    border-radius: 50%;
    border: 2px solid #78350f;
}

.mt-monkey-ear-l { left: 0; }
.mt-monkey-ear-r { right: 0; }

.mt-monkey-arm {
    position: absolute;
    width: 30px;
    height: 9px;
    background: #a16207;
    border-radius: 5px;
    bottom: 30%;
    z-index: 5;
}

.mt-monkey-hand {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ca8a04;
    border-radius: 50%;
    top: -2px;
}

.mt-monkey-arm-l {
    left: 2%;
    transform: rotate(32deg);
    transform-origin: right center;
}

.mt-monkey-arm-l .mt-monkey-hand {
    left: -4px;
}

.mt-monkey-arm-r {
    right: 0;
    transform: rotate(-38deg);
    transform-origin: left center;
}

.mt-monkey-arm-r .mt-monkey-hand {
    right: -4px;
}

.mt-monkey-hero.is-typing .mt-monkey-head {
    animation: mt-head-type 0.16s ease;
}

.mt-monkey-hero.is-typing .mt-monkey-arm-l {
    animation: mt-arm-left-type 0.16s ease;
}

.mt-monkey-hero.is-typing .mt-monkey-arm-r {
    animation: mt-arm-type 0.14s ease;
}

.mt-monkey-hero.is-throw .mt-monkey-face {
    animation: mt-monkey-throw 0.55s ease;
}

.mt-monkey-hero.is-throw .mt-monkey-arm-r {
    animation: mt-arm-launch 0.55s ease;
}

.mt-monkey-hero.is-throw .mt-monkey-body {
    animation: mt-body-throw 0.55s ease;
}

.mt-monkey-hero.is-celebrate .mt-monkey-face {
    animation: mt-monkey-dance 0.65s ease;
}

.mt-monkey-hero.is-celebrate .mt-monkey-tail {
    animation: mt-tail-celebrate 0.65s ease;
}

.mt-monkey-hero.is-oops .mt-monkey-face {
    animation: mt-monkey-oops 0.4s ease;
}

.mt-monkey.is-typing .mt-monkey-arm-r,
.mt-monkey.is-throw .mt-monkey-face,
.mt-monkey.is-celebrate .mt-monkey-face,
.mt-monkey.is-oops .mt-monkey-face {
    /* legacy alias */
}

.mt-launcher {
    position: absolute;
    left: 62%;
    bottom: 28%;
    width: 36px;
    height: 36px;
    z-index: 1;
}

.mt-launcher-arm {
    position: absolute;
    left: 0;
    bottom: 8px;
    width: 28px;
    height: 6px;
    background: #57534e;
    border-radius: 3px;
    transform-origin: left center;
    transform: rotate(-12deg);
}

.mt-launcher-cup {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 16px;
    height: 14px;
    background: #78716c;
    border-radius: 4px 4px 8px 8px;
    border: 2px solid #44403c;
}

.mt-launcher.is-fire .mt-launcher-arm {
    animation: mt-launcher-fire 0.48s ease;
}

.mt-launcher.is-fire .mt-launcher-cup::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 2px;
    width: 14px;
    height: 8px;
    background: radial-gradient(circle, #fde047, #f97316, transparent 70%);
    border-radius: 50%;
    animation: mt-flame 0.35s ease-out forwards;
}

/* —— Sort zone (right) —— */
.mt-sort-zone {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 58%;
    height: 100%;
}

.mt-portals {
    display: none;
}

.mt-monkey-stations {
    position: absolute;
    top: 4%;
    left: 2%;
    right: 2%;
    display: flex;
    justify-content: space-around;
    gap: 8px;
    z-index: 2;
}

.mt-station {
    position: relative;
    flex: 1;
    max-width: 96px;
    height: 118px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.mt-station-platform {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 14px;
    background: linear-gradient(180deg, #78716c, #57534e);
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.mt-station-bin {
    position: absolute;
    bottom: 12px;
    width: 52%;
    height: 22px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 0 0 12px 12px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-top: none;
    box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.5);
}

.mt-station-monkey {
    position: relative;
    z-index: 2;
    margin-bottom: 18px;
    animation: mt-station-idle 2.4s ease-in-out infinite;
}

.mt-station-emoji {
    font-size: clamp(1.8rem, 4.5vw, 2.4rem);
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
    transform-origin: center bottom;
}

.mt-station-name {
    position: absolute;
    bottom: -2px;
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    z-index: 3;
}

.mt-station-miko .mt-station-bin { border-color: rgba(251, 191, 36, 0.45); }
.mt-station-bongo .mt-station-bin { border-color: rgba(163, 230, 53, 0.45); }
.mt-station-kong .mt-station-bin { border-color: rgba(196, 181, 253, 0.45); }

.mt-station.is-target .mt-station-monkey {
    animation: mt-station-wave 0.55s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(253, 224, 71, 0.55));
}

.mt-station.is-target .mt-station-platform {
    box-shadow: 0 0 16px rgba(253, 224, 71, 0.35);
}

.mt-station.is-catch .mt-station-emoji {
    animation: mt-station-catch 0.35s ease;
}

.mt-station.is-catch .mt-station-bin {
    animation: mt-bin-catch 0.32s ease;
}

.mt-portal,
.mt-portal-ring,
.mt-portal-mouth {
    display: none;
}

/* Conveyor */
.mt-conveyor {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14%;
    height: 22%;
    z-index: 1;
}

.mt-conveyor-rail {
    position: absolute;
    left: 0;
    right: 0;
    height: 5px;
    background: #57534e;
    border-radius: 2px;
}

.mt-conveyor-rail-t { top: 0; }
.mt-conveyor-rail-b { bottom: 0; }

.mt-conveyor-belt {
    position: absolute;
    left: 0;
    right: 0;
    top: 5px;
    bottom: 5px;
    background: #292524;
    overflow: hidden;
    border-radius: 2px;
}

.mt-belt-stripes {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        #44403c 0,
        #44403c 14px,
        #3f3f46 14px,
        #3f3f46 28px
    );
}

.mt-spotlight {
    position: absolute;
    left: 38%;
    top: -30%;
    width: 28%;
    height: 80%;
    background: radial-gradient(ellipse at 50% 100%, rgba(253, 224, 71, 0.18), transparent 65%);
    pointer-events: none;
    animation: mt-spot-pulse 2s ease-in-out infinite;
}

.mt-cart {
    position: absolute;
    left: 8%;
    bottom: 18%;
    width: 52px;
    height: 36px;
    z-index: 0;
    opacity: 0.85;
}

.mt-cart-bed {
    position: absolute;
    inset: 8px 0 12px 0;
    background: #78716c;
    border-radius: 4px;
    border: 2px solid #57534e;
}

.mt-cart-wheel {
    position: absolute;
    bottom: 0;
    width: 12px;
    height: 12px;
    background: #1c1917;
    border-radius: 50%;
    border: 2px solid #44403c;
    animation: mt-wheel-spin 0.6s linear infinite;
}

.mt-cart-wheel-l { left: 6px; }
.mt-cart-wheel-r { right: 6px; }

.mt-cart-monkey {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
}

/* Crates */
.mt-crate {
    position: absolute;
    z-index: 5;
    transform: translate(-50%, -50%);
    transition: filter 0.15s;
}

.mt-crate.is-enter {
    animation: mt-crate-drop 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.mt-crate.is-active {
    z-index: 9;
    filter: drop-shadow(0 0 12px rgba(253, 224, 71, 0.55));
}

.mt-crate.is-flying {
    z-index: 20;
    pointer-events: none;
}

.mt-crate.is-gone {
    opacity: 0;
}

.mt-crate.is-spill {
    animation: mt-crate-spill 0.4s ease-in forwards;
}

.mt-crate-shadow {
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 70%;
    height: 8px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    filter: blur(2px);
}

.mt-crate-body {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 4px;
    padding: 4px;
    background: linear-gradient(145deg, #d6d3d1, #a8a29e);
    border: 2px solid #78716c;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.mt-crate-stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    border-radius: 4px 4px 0 0;
}

.mt-crate-miko .mt-crate-stripe { background: #f59e0b; }
.mt-crate-bongo .mt-crate-stripe { background: #84cc16; }
.mt-crate-kong .mt-crate-stripe { background: #a78bfa; }

.mt-crate-monkey-tag {
    font-size: 1rem;
    align-self: center;
    line-height: 1;
}

.mt-crate-icon {
    font-size: 1.1rem;
    align-self: center;
    padding: 0 2px;
}

.mt-crate-face {
    display: flex;
    flex-direction: column;
    min-width: 76px;
    padding: 2px 4px 4px;
    background: rgba(255, 251, 235, 0.95);
    border-radius: 4px;
}

.mt-crate-tag {
    font-size: 0.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #78716c;
}

.mt-crate-word {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.12em;
    justify-content: center;
    font-weight: 700;
    line-height: 1.35;
    color: #1c1917;
}

.mt-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0.75em;
    min-height: 1.25em;
    flex-shrink: 0;
}

.mt-letter.is-next {
    z-index: 2;
    background: #fde047;
    outline: 1px solid #ca8a04;
    border-radius: 2px;
    animation: mt-m-blink 0.7s step-end infinite;
}

.mt-letter.is-done {
    color: #15803d;
    opacity: 0.5;
}

/* FX */
.mt-fx-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 25;
    overflow: hidden;
}

.mt-particle {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: mt-particle-fly 0.55s ease-out forwards;
}

/* Keyframes */
@keyframes mt-leaf-drift {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0.5; }
    50% { opacity: 0.75; }
    100% { transform: translate(-40px, 120px) rotate(120deg); opacity: 0; }
}

@keyframes mt-tail-sway {
    0%, 100% { transform: rotate(-35deg); }
    50% { transform: rotate(-18deg); }
}

@keyframes mt-monkey-idle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes mt-arm-type {
    0%, 100% { transform: rotate(-32deg); }
    50% { transform: rotate(-8deg) translateY(-2px); }
}

@keyframes mt-monkey-throw {
    0% { transform: rotate(0) scale(1); }
    30% { transform: rotate(-12deg) scale(1.05); }
    60% { transform: rotate(8deg) scale(1); }
    100% { transform: rotate(0); }
}

@keyframes mt-arm-launch {
    0% { transform: rotate(-32deg); }
    35% { transform: rotate(18deg) scaleX(1.15); }
    100% { transform: rotate(-32deg); }
}

@keyframes mt-monkey-dance {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-8deg) translateY(-6px); }
    75% { transform: rotate(8deg) translateY(-4px); }
}

@keyframes mt-monkey-oops {
    0%, 100% { transform: rotate(0); }
    30% { transform: rotate(-14deg); }
    60% { transform: rotate(10deg); }
}

@keyframes mt-launcher-fire {
    0% { transform: rotate(-12deg); }
    40% { transform: rotate(28deg); }
    100% { transform: rotate(-12deg); }
}

@keyframes mt-flame {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(1.8); }
}

@keyframes mt-monkey-blink {
    0%, 42%, 44%, 100% { opacity: 0; }
    43% { opacity: 0.85; }
}

@keyframes mt-head-type {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(2px) rotate(-2deg); }
}

@keyframes mt-arm-left-type {
    0%, 100% { transform: rotate(32deg); }
    50% { transform: rotate(18deg) translateY(-1px); }
}

@keyframes mt-body-throw {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.04) translateY(-3px); }
}

@keyframes mt-tail-celebrate {
    0%, 100% { transform: rotate(-35deg); }
    50% { transform: rotate(-8deg); }
}

@keyframes mt-station-idle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes mt-station-wave {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(-6deg) translateY(-3px); }
    75% { transform: rotate(6deg) translateY(-2px); }
}

@keyframes mt-station-catch {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.15) translateY(-6px); }
}

@keyframes mt-bin-catch {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.75); }
}

@keyframes mt-portal-spin {
    to { transform: rotate(360deg); }
}

@keyframes mt-portal-suck {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.82); }
}

@keyframes mt-portal-flash {
    50% { filter: brightness(1.6); }
}

@keyframes mt-spot-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes mt-wheel-spin {
    to { transform: rotate(360deg); }
}

@keyframes mt-crate-drop {
    0% { transform: translate(-50%, -120%) scale(0.6); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes mt-crate-spill {
    to {
        transform: translate(-50%, -20%) rotate(-24deg);
        opacity: 0;
    }
}

@keyframes mt-particle-fly {
    to {
        transform: translate(-50%, -50%) rotate(var(--mt-angle, 0deg)) translateX(var(--mt-dist, 30px));
        opacity: 0;
    }
}

@keyframes mt-monitor-glitch {
    0%, 100% { transform: translate(0); filter: none; }
    25% { transform: translate(-3px, 1px); filter: hue-rotate(40deg); }
    50% { transform: translate(2px, -2px); }
    75% { transform: translate(-1px, 2px); filter: hue-rotate(-30deg); }
}

@keyframes mt-m-blink {
    50% { background: #fef9c3; }
}

/* Passage mode (Type Racer style) */
.mt-conveyor,
.mt-cart,
.mt-launcher,
.mt-crate {
    display: none !important;
}

.mt-monitor-progress {
    position: relative;
    z-index: 1;
    font-size: 0.52rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 4px;
}

.mt-passage-panel {
    position: relative;
    z-index: 1;
    max-height: 88px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 2px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.55);
}

.mt-passage {
    font-family: 'Fira Code', 'Noto Sans JP', 'Noto Sans Tamil', monospace;
    font-size: clamp(0.72rem, 1.8vw, 0.92rem);
    font-weight: 600;
    line-height: 1.55;
    color: #94a3b8;
    word-spacing: 0.12em;
}

.mt-word {
    border-radius: 3px;
    padding: 0 1px;
    transition: color 0.12s, background 0.12s;
}

.mt-word.is-done {
    color: #4ade80;
    opacity: 0.55;
}

.mt-word.is-current {
    color: #fef08a;
    background: rgba(234, 179, 8, 0.22);
    box-shadow: inset 0 -2px 0 #eab308;
}

.mt-word.is-error {
    animation: mt-word-shake 0.28s ease;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.25);
}

.mt-station-bin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 0.62rem;
    font-weight: 800;
    color: #fde047;
}

.mt-banana-count {
    min-width: 1.2em;
    text-align: right;
}

.mt-flying-banana {
    position: absolute;
    font-size: 1.35rem;
    z-index: 30;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

@keyframes mt-word-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.script-tamil .mt-passage,
.script-tamil .mt-word {
    font-family: 'Noto Sans Tamil', 'Latha', sans-serif;
}

.script-tamil .mt-crate-word,
.script-tamil .mt-letter,
.script-tamil .mt-monitor-word {
    font-family: 'Noto Sans Tamil', 'Latha', sans-serif;
}
