/* Inspector Gadget easter egg — dashboard home button */

.ig-stage {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10060;
    overflow: hidden;
    opacity: 0;
    animation: ig-stage-in 0.35s ease forwards;
}

.ig-stage.ig-stage--out {
    animation: ig-stage-out 0.6s ease forwards;
}

@keyframes ig-stage-in {
    to { opacity: 1; }
}

@keyframes ig-stage-out {
    to { opacity: 0; }
}

.ig-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
    opacity: 0;
    animation: ig-vignette-pulse 40s ease-in-out forwards;
}

@keyframes ig-vignette-pulse {
    8%, 75% { opacity: 0.55; }
    0%, 6%, 78%, 100% { opacity: 0; }
}

.ig-flash {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    opacity: 0;
}

.ig-flash.ig-flash--on {
    animation: ig-flash-pop 0.45s ease-out;
}

@keyframes ig-flash-pop {
    0% { opacity: 0; }
    15% { opacity: 0.7; }
    100% { opacity: 0; }
}

/* ── Character ── */
.ig-character {
    position: fixed;
    left: 0;
    top: 0;
    width: 78px;
    height: 148px;
    transform: translate3d(var(--ig-x, -110px), var(--ig-y, 50vh), 0) scaleX(var(--ig-face, 1));
    transition: transform var(--ig-move-ms, 900ms) cubic-bezier(0.42, 0.01, 0.22, 1);
    z-index: 10062;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

.ig-body-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Hat */
.ig-hat {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 22px;
    z-index: 5;
}

.ig-hat-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 14px;
    background: linear-gradient(180deg, #5c4030 0%, #3d2817 100%);
    border-radius: 6px 6px 2px 2px;
}

.ig-hat-brim {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 8px;
    background: linear-gradient(180deg, #4a3220 0%, #2a1a0e 100%);
    border-radius: 50%;
}

.ig-character.ig-character--hat-tip .ig-hat {
    animation: ig-hat-tip 0.9s ease-in-out;
}

@keyframes ig-hat-tip {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    40% { transform: translateX(-50%) rotate(-22deg) translateY(-4px); }
    70% { transform: translateX(-50%) rotate(-8deg); }
}

/* Head */
.ig-head {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 36px;
    background: linear-gradient(180deg, #f5d0b5 0%, #e8b896 100%);
    border-radius: 50% 50% 46% 46%;
    z-index: 4;
}

.ig-eye {
    position: absolute;
    top: 12px;
    width: 7px;
    height: 9px;
    background: #fff;
    border-radius: 50%;
    border: 1px solid #333;
}

.ig-eye::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: #1a1a1a;
    border-radius: 50%;
    top: 2px;
    left: 1px;
}

.ig-eye--l { left: 7px; }
.ig-eye--r { right: 7px; }

.ig-character.ig-character--inspecting .ig-eye--l::after,
.ig-character.ig-character--inspecting .ig-eye--r::after {
    animation: ig-eye-dart 0.6s ease-in-out infinite;
}

@keyframes ig-eye-dart {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(2px, 1px); }
}

.ig-nose {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 5px;
    background: #d4a574;
    border-radius: 50%;
}

/* Trench coat */
.ig-coat {
    position: absolute;
    top: 46px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 58px;
    background: linear-gradient(180deg, #c4a574 0%, #a88852 55%, #8f7344 100%);
    border-radius: 8px 8px 4px 4px;
    z-index: 3;
    overflow: visible;
}

.ig-collar {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 12px;
    background: #ddd;
    border-radius: 4px 4px 0 0;
    border: 1px solid #bbb;
}

.ig-coat-flap {
    position: absolute;
    bottom: 0;
    width: 22px;
    height: 38px;
    background: linear-gradient(180deg, #b89860 0%, #9a7a48 100%);
    border-radius: 0 0 6px 6px;
    transform-origin: top center;
}

.ig-coat-flap--l {
    left: 2px;
    animation: ig-flap-l 0.38s ease-in-out infinite;
}

.ig-coat-flap--r {
    right: 2px;
    animation: ig-flap-r 0.38s ease-in-out infinite;
}

.ig-character.ig-character--inspecting .ig-coat-flap--l,
.ig-character.ig-character--inspecting .ig-coat-flap--r {
    animation: none;
}

@keyframes ig-flap-l {
    0%, 100% { transform: rotate(4deg); }
    50% { transform: rotate(-6deg); }
}

@keyframes ig-flap-r {
    0%, 100% { transform: rotate(-4deg); }
    50% { transform: rotate(6deg); }
}

.ig-button {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    box-shadow: 0 10px 0 #333, 0 20px 0 #333;
}

/* Legs & walk cycle */
.ig-legs {
    position: absolute;
    top: 98px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 46px;
    z-index: 2;
}

.ig-leg {
    position: absolute;
    bottom: 0;
    width: 14px;
    height: 34px;
    background: linear-gradient(180deg, #3d4a5c 0%, #2a3340 100%);
    border-radius: 4px 4px 2px 2px;
    transform-origin: top center;
}

.ig-leg--l { left: 6px; }
.ig-leg--r { right: 6px; }

.ig-shoe {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 8px;
    background: #1a1a1a;
    border-radius: 4px 6px 2px 2px;
}

.ig-character.ig-character--walking .ig-leg--l {
    animation: ig-step-l 0.38s ease-in-out infinite;
}

.ig-character.ig-character--walking .ig-leg--r {
    animation: ig-step-r 0.38s ease-in-out infinite;
}

.ig-character.ig-character--walking .ig-body-wrap {
    animation: ig-body-bob 0.38s ease-in-out infinite;
}

@keyframes ig-step-l {
    0%, 100% { transform: rotate(-18deg) translateY(0); }
    50% { transform: rotate(22deg) translateY(-3px); }
}

@keyframes ig-step-r {
    0%, 100% { transform: rotate(22deg) translateY(-3px); }
    50% { transform: rotate(-18deg) translateY(0); }
}

@keyframes ig-body-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Extendable arm + magnifier */
.ig-arm {
    position: absolute;
    top: 54px;
    right: -8px;
    width: 80px;
    height: 24px;
    transform-origin: left center;
    z-index: 6;
}

.ig-arm-upper {
    position: absolute;
    left: 0;
    top: 8px;
    width: 22px;
    height: 10px;
    background: #c4a574;
    border-radius: 4px;
    transform: rotate(-8deg);
}

.ig-arm-extend {
    position: absolute;
    left: 18px;
    top: 6px;
    width: 0;
    height: 12px;
    background: linear-gradient(90deg, #c4a574, #d4b888);
    border-radius: 6px;
    transition: width 0.55s cubic-bezier(0.34, 1.4, 0.64, 1);
    overflow: visible;
}

.ig-character.ig-character--inspecting .ig-arm-extend {
    width: 62px;
}

.ig-character.ig-character--inspecting-closer .ig-arm-extend {
    width: 78px;
}

.ig-character.ig-character--under-look .ig-arm {
    top: 42px;
    transform: rotate(-38deg);
}

.ig-character.ig-character--under-look .ig-arm-extend {
    width: 96px;
}

.ig-character.ig-character--under-look .ig-body-wrap {
    animation: ig-peek-bob 0.85s ease-in-out infinite;
}

@keyframes ig-peek-bob {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-4px) rotate(1deg); }
}

.ig-character.ig-character--under-look .ig-magnifier-lens {
    width: 42px;
    height: 42px;
    border-width: 5px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.9), 0 0 28px rgba(120, 200, 255, 0.85);
}

.ig-magnifier {
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    transition: transform 0.45s cubic-bezier(0.34, 1.5, 0.64, 1) 0.15s;
}

.ig-character.ig-character--inspecting .ig-magnifier {
    transform: translateY(-50%) scale(1);
}

.ig-magnifier-lens {
    width: 34px;
    height: 34px;
    border: 4px solid #888;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95) 0%, rgba(200, 230, 255, 0.45) 45%, rgba(100, 160, 220, 0.25) 100%);
    box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.8), 0 0 16px rgba(100, 180, 255, 0.55);
    animation: ig-lens-glint 1.2s ease-in-out infinite;
}

@keyframes ig-lens-glint {
    0%, 100% { box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.8), 0 0 12px rgba(100, 180, 255, 0.4); }
    50% { box-shadow: inset 0 0 12px rgba(255, 255, 255, 1), 0 0 24px rgba(100, 180, 255, 0.75); }
}

.ig-magnifier-handle {
    position: absolute;
    bottom: -8px;
    right: -6px;
    width: 6px;
    height: 18px;
    background: linear-gradient(180deg, #666, #444);
    border-radius: 3px;
    transform: rotate(35deg);
}

/* Foot dust puffs */
.ig-dust {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(180, 160, 130, 0.45);
    pointer-events: none;
    z-index: 10061;
    animation: ig-dust-puff 0.55s ease-out forwards;
}

@keyframes ig-dust-puff {
    0% { opacity: 0.7; transform: translate(0, 0) scale(0.4); }
    100% { opacity: 0; transform: translate(var(--dust-x, 8px), -14px) scale(1.6); }
}

/* Speech bubble */
.ig-speech {
    position: fixed;
    left: var(--ig-speech-x, 50%);
    top: var(--ig-speech-y, 40%);
    transform: translate(-50%, -100%) scale(0.7);
    opacity: 0;
    z-index: 10063;
    padding: 0.45rem 0.85rem;
    background: #fff;
    color: #1a1a1a;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 14px;
    border: 2px solid #333;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    pointer-events: none;
}

.ig-speech::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #333;
}

.ig-speech.ig-speech--on {
    animation: ig-speech-pop 0.35s cubic-bezier(0.34, 1.5, 0.64, 1) forwards;
}

@keyframes ig-speech-pop {
    0% { opacity: 0; transform: translate(-50%, -80%) scale(0.5); }
    70% { transform: translate(-50%, -108%) scale(1.05); }
    100% { opacity: 1; transform: translate(-50%, -105%) scale(1); }
}

/* Block inspection effects */
.ig-inspect-target {
    position: relative;
    z-index: 10055 !important;
    overflow: visible !important;
    transition: transform 0.65s cubic-bezier(0.34, 1.45, 0.64, 1), box-shadow 0.65s ease, filter 0.4s ease;
    transform-origin: center bottom;
    will-change: transform;
}

.ig-inspect-target.ig-inspect-scan {
    filter: brightness(1.04);
}

.ig-inspect-target.ig-inspect-lift {
    transform: perspective(1100px) rotateX(6deg) translateY(-6px) scale(1.004);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18), 0 0 0 2px rgba(100, 180, 255, 0.22) !important;
}

.ig-inspect-target.ig-inspect-peek {
    transform: perspective(850px) rotateX(24deg) translateY(-28px) scale(1.018);
    box-shadow:
        0 36px 64px rgba(0, 0, 0, 0.38),
        0 8px 0 rgba(0, 0, 0, 0.08),
        0 0 0 3px rgba(100, 180, 255, 0.45),
        0 0 32px rgba(100, 180, 255, 0.18) !important;
}

.ig-inspect-target.ig-inspect-settle {
    transform: perspective(1100px) rotateX(0deg) translateY(0) scale(1);
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.12)) !important;
    transition-duration: 0.5s;
}

.ig-inspect-target.ig-inspect-scan::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(51, 255, 150, 0.95), rgba(100, 200, 255, 0.95), transparent);
    box-shadow: 0 0 16px rgba(51, 255, 150, 0.65);
    z-index: 20;
    animation: ig-scan-line 1.5s ease-in-out;
    pointer-events: none;
}

.ig-inspect-target.ig-inspect-peek::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 8px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent);
    z-index: 19;
    pointer-events: none;
    opacity: 0.85;
}

@keyframes ig-scan-line {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: calc(100% - 4px); opacity: 0; }
}

/* Card underside lip visible during lift */
.ig-card-lip {
    position: fixed;
    z-index: 10056;
    height: 7px;
    pointer-events: none;
    background: linear-gradient(180deg, var(--bg-card, #fff) 0%, color-mix(in srgb, var(--bg-card, #fff) 70%, #888) 100%);
    border-radius: 0 0 3px 3px;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.ig-card-lip--on {
    opacity: 1;
    transform: translateY(-28px);
}

/* Magnifier spotlight on the gap */
.ig-spotlight {
    position: fixed;
    z-index: 10057;
    height: 90px;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(180, 220, 255, 0.55) 0%, rgba(100, 180, 255, 0.12) 45%, transparent 72%);
    opacity: 0;
    transform: translateY(-8px) scaleY(0.6);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1.1, 0.36, 1);
    mix-blend-mode: screen;
}

.ig-spotlight--on {
    opacity: 1;
    transform: translateY(-26px) scaleY(1);
}

/* Cross-section cavity under lifted blocks */
.ig-cavity {
    position: fixed;
    z-index: 10054;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    opacity: 0;
    transform-origin: top center;
    transition: height 0.55s cubic-bezier(0.22, 1.15, 0.36, 1), opacity 0.35s ease;
}

.ig-cavity--open {
    height: 96px;
    opacity: 1;
}

.ig-cavity--close {
    height: 0 !important;
    opacity: 0;
    transition-duration: 0.45s;
}

.ig-cavity__lip {
    height: 5px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.12));
    border-radius: 0 0 2px 2px;
}

.ig-cavity__inner {
    position: relative;
    height: 91px;
    background: linear-gradient(180deg, #141820 0%, #0a0d12 55%, #06080b 100%);
    border: 2px solid rgba(90, 100, 115, 0.5);
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: inset 0 12px 28px rgba(0, 0, 0, 0.55), 0 10px 24px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.ig-cavity__wall {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 14px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.45), transparent);
    pointer-events: none;
}

.ig-cavity__wall--l { left: 0; }
.ig-cavity__wall--r {
    right: 0;
    transform: scaleX(-1);
}

.ig-cavity__back {
    position: absolute;
    inset: 0.4rem 0.75rem auto;
    text-align: center;
    z-index: 2;
}

.ig-cavity__tag {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.56rem;
    font-weight: 600;
    color: rgba(147, 197, 168, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ig-cavity__status {
    margin-top: 0.15rem;
    font-family: ui-monospace, monospace;
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: rgba(130, 180, 150, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.ig-cavity__led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6fcf97;
    box-shadow: 0 0 8px rgba(111, 207, 151, 0.9);
    animation: ig-led-blink 1.1s ease-in-out infinite;
}

@keyframes ig-led-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.ig-cavity__pipes {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 1.1rem;
    height: 46px;
}

.ig-cavity__pipe {
    position: absolute;
    background: linear-gradient(180deg, #9aa8b8 0%, #5a6675 50%, #434b57 100%);
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -2px 4px rgba(0, 0, 0, 0.35);
}

.ig-cavity__pipe--main {
    left: calc(var(--ig-pipe-seed, 5) * 3%);
    bottom: 0;
    width: 12px;
    height: 100%;
}

.ig-cavity__pipe--cross {
    left: calc(var(--ig-pipe-seed, 5) * 3% + 4px);
    bottom: 42%;
    width: calc(42% + var(--ig-pipe-seed, 5) * 2%);
    height: 11px;
}

.ig-cavity__pipe--thin {
    right: calc(12% + var(--ig-pipe-seed, 5) * 1%);
    bottom: 0;
    width: 8px;
    height: 68%;
    opacity: 0.85;
}

.ig-cavity__joint {
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #b0bac8, #6a7585);
    box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.4);
}

.ig-cavity__joint--a {
    left: calc(var(--ig-pipe-seed, 5) * 3% + 2px);
    bottom: calc(42% - 2px);
}

.ig-cavity__joint--b {
    right: calc(12% + var(--ig-pipe-seed, 5) * 1% - 2px);
    bottom: 62%;
}

.ig-cavity__valve {
    position: absolute;
    left: 52%;
    bottom: 38%;
    width: 17px;
    height: 17px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, #c4956a, #8b6840);
    border: 2px solid #6b5030;
    border-radius: 2px;
    animation: ig-valve-turn 2.2s ease-in-out infinite;
}

.ig-cavity__flow {
    position: absolute;
    left: calc(var(--ig-pipe-seed, 5) * 3% + 4px);
    bottom: 4px;
    width: 5px;
    height: calc(100% - 8px);
    border-radius: 2px;
    background: linear-gradient(
        180deg,
        transparent,
        var(--ig-flow-color, #7d9a8a),
        color-mix(in srgb, var(--ig-flow-color, #7d9a8a) 75%, white),
        var(--ig-flow-color, #7d9a8a),
        transparent
    );
    background-size: 100% 200%;
    animation: ig-flow-pulse 0.75s linear infinite;
    filter: drop-shadow(0 0 5px var(--ig-flow-color, #7d9a8a));
}

.ig-cavity__packet {
    position: absolute;
    width: 7px;
    height: 5px;
    border-radius: 1px;
    background: var(--ig-flow-color, #7d9a8a);
    opacity: 0.9;
    box-shadow: 0 0 6px var(--ig-flow-color, #7d9a8a);
}

.ig-cavity__packet--1 {
    left: calc(var(--ig-pipe-seed, 5) * 3% + 2px);
    animation: ig-packet-flow 1.4s linear infinite;
}

.ig-cavity__packet--2 {
    left: calc(var(--ig-pipe-seed, 5) * 3% + 2px);
    animation: ig-packet-flow 1.4s linear infinite 0.65s;
}

@keyframes ig-packet-flow {
    0% { bottom: 8%; opacity: 0; }
    15% { opacity: 0.95; }
    85% { opacity: 0.95; }
    100% { bottom: 88%; opacity: 0; }
}

.ig-cavity__label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.35rem;
    text-align: center;
    font-family: ui-monospace, monospace;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(190, 200, 215, 0.82);
    z-index: 3;
}

@keyframes ig-flow-pulse {
    0% { background-position: 0 -100%; }
    100% { background-position: 0 100%; }
}

@keyframes ig-valve-turn {
    0%, 100% { transform: rotate(45deg); }
    50% { transform: rotate(90deg); }
}

.ig-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(2) rotate(-12deg);
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: rgba(74, 124, 102, 0.85);
    border: 4px solid rgba(74, 124, 102, 0.85);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    opacity: 0;
    z-index: 25;
    pointer-events: none;
    font-family: ui-monospace, monospace;
}

.ig-inspect-target.ig-inspect-clear .ig-stamp {
    animation: ig-stamp-slam 0.4s cubic-bezier(0.34, 1.6, 0.64, 1) 0.5s forwards;
}

@keyframes ig-stamp-slam {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(2.5) rotate(-12deg); }
    60% { opacity: 1; transform: translate(-50%, -50%) scale(0.95) rotate(-12deg); }
    100% { opacity: 0.85; transform: translate(-50%, -50%) scale(1) rotate(-12deg); }
}

/* Helper speech bubbles */
.ig-speech--penny {
    font-size: 0.72rem;
    border-color: #7d9a8a;
    background: #f8fffb;
    z-index: 10064;
}

.ig-speech--brain {
    font-size: 0.68rem;
    border-color: #8b6840;
    background: #fffaf0;
    z-index: 10064;
}

/* ── Penny ── */
.ig-penny {
    position: fixed;
    left: 0;
    top: 0;
    width: 58px;
    height: 108px;
    transform: translate3d(var(--ig-x, 100vw), var(--ig-y, 50vh), 0) scaleX(var(--ig-face, -1));
    transition: transform var(--ig-move-ms, 900ms) cubic-bezier(0.42, 0.01, 0.22, 1);
    z-index: 10061;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.28));
    opacity: 1;
}

.ig-penny--hidden {
    opacity: 0;
    pointer-events: none;
}

.ig-penny__body {
    position: relative;
    width: 100%;
    height: 100%;
}

.ig-penny__hair {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 22px;
    background: linear-gradient(180deg, #f5d76e 0%, #d4b84a 100%);
    border-radius: 50% 50% 40% 40%;
    z-index: 4;
}

.ig-penny__hair::before,
.ig-penny__hair::after {
    content: '';
    position: absolute;
    top: 10px;
    width: 10px;
    height: 18px;
    background: linear-gradient(180deg, #f5d76e, #c9a83a);
    border-radius: 50%;
}

.ig-penny__hair::before { left: -4px; transform: rotate(-18deg); }
.ig-penny__hair::after { right: -4px; transform: rotate(18deg); }

.ig-penny__head {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 28px;
    background: linear-gradient(180deg, #f5d0b5, #e8b896);
    border-radius: 50% 50% 44% 44%;
    z-index: 3;
}

.ig-penny__eye {
    position: absolute;
    top: 10px;
    width: 5px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    border: 1px solid #333;
}

.ig-penny__eye::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: #1a1a1a;
    border-radius: 50%;
    top: 1px;
    left: 1px;
}

.ig-penny__eye--l { left: 6px; }
.ig-penny__eye--r { right: 6px; }

.ig-penny__coat {
    position: absolute;
    top: 38px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 38px;
    background: linear-gradient(180deg, #5a9a6a 0%, #3d7350 100%);
    border-radius: 8px 8px 4px 4px;
    z-index: 2;
}

.ig-penny__coat::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 8px;
    background: #fff;
    border-radius: 3px;
}

.ig-penny__legs {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 28px;
}

.ig-penny__leg {
    position: absolute;
    bottom: 0;
    width: 10px;
    height: 24px;
    background: linear-gradient(180deg, #4a6a8a, #2a4058);
    border-radius: 4px 4px 3px 3px;
}

.ig-penny__leg--l { left: 2px; }
.ig-penny__leg--r { right: 2px; }

.ig-penny__computer {
    position: absolute;
    top: 48px;
    right: -14px;
    width: 22px;
    height: 16px;
    background: #555;
    border-radius: 2px 2px 0 0;
    z-index: 5;
    transform-origin: left center;
}

.ig-penny__screen {
    position: absolute;
    inset: 2px 2px 4px;
    background: linear-gradient(135deg, #1a3a2a, #2a5a40);
    border-radius: 1px;
}

.ig-penny__screen::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: rgba(100, 220, 150, 0.35);
    animation: ig-penny-screen 0.8s ease-in-out infinite;
}

@keyframes ig-penny-screen {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.ig-penny--walking .ig-penny__leg--l {
    animation: ig-penny-step-l 0.36s ease-in-out infinite;
}

.ig-penny--walking .ig-penny__leg--r {
    animation: ig-penny-step-r 0.36s ease-in-out infinite;
}

@keyframes ig-penny-step-l {
    0%, 100% { transform: rotate(-12deg); }
    50% { transform: rotate(14deg) translateY(-2px); }
}

@keyframes ig-penny-step-r {
    0%, 100% { transform: rotate(14deg) translateY(-2px); }
    50% { transform: rotate(-12deg); }
}

.ig-penny--typing .ig-penny__computer {
    animation: ig-penny-type 0.35s ease-in-out infinite;
}

@keyframes ig-penny-type {
    0%, 100% { transform: rotate(-4deg); }
    50% { transform: rotate(2deg) translateY(-1px); }
}

.ig-penny--watching .ig-penny__computer {
    transform: rotate(-18deg) translateY(-4px);
}

.ig-penny--watching .ig-penny__eye::after {
    animation: ig-eye-dart 0.5s ease-in-out infinite;
}

/* ── Brain the dog ── */
.ig-brain {
    position: fixed;
    left: 0;
    top: 0;
    width: 52px;
    height: 56px;
    transform: translate3d(var(--ig-x, 100vw), var(--ig-y, 50vh), 0) scaleX(var(--ig-face, -1));
    transition: transform var(--ig-move-ms, 900ms) cubic-bezier(0.42, 0.01, 0.22, 1);
    z-index: 10061;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.25));
    opacity: 1;
}

.ig-brain--hidden {
    opacity: 0;
    pointer-events: none;
}

.ig-brain__body-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

.ig-brain__disguise {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 14px;
    background: linear-gradient(180deg, #5c4030, #3d2817);
    border-radius: 6px 6px 2px 2px;
    z-index: 4;
    opacity: 0.85;
}

.ig-brain__disguise::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 6px;
    background: #4a3220;
    border-radius: 50%;
}

.ig-brain__head {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 28px;
    background: linear-gradient(180deg, #f5f0e8, #e8dfd0);
    border-radius: 50% 50% 45% 45%;
    z-index: 3;
}

.ig-brain__ear {
    position: absolute;
    top: -2px;
    width: 12px;
    height: 16px;
    background: linear-gradient(180deg, #c4956a, #8b6840);
    border-radius: 50% 50% 20% 20%;
}

.ig-brain__ear--l { left: -2px; transform: rotate(-22deg); }
.ig-brain__ear--r { right: -2px; transform: rotate(22deg); }

.ig-brain__snout {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 12px;
    background: #f5f0e8;
    border-radius: 50% 50% 40% 40%;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.ig-brain__snout::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 4px;
    background: #333;
    border-radius: 50%;
}

.ig-brain__torso {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 16px;
    background: linear-gradient(180deg, #f5f0e8, #ddd5c8);
    border-radius: 40% 40% 30% 30%;
    z-index: 2;
}

.ig-brain__legs {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 14px;
}

.ig-brain__paw {
    position: absolute;
    bottom: 0;
    width: 10px;
    height: 12px;
    background: #e8dfd0;
    border-radius: 40% 40% 50% 50%;
    border-bottom: 2px solid #c4b8a8;
}

.ig-brain__paw--l { left: 4px; }
.ig-brain__paw--r { right: 4px; }

.ig-brain__tail {
    position: absolute;
    right: -2px;
    top: 26px;
    width: 14px;
    height: 8px;
    background: #e8dfd0;
    border-radius: 50%;
    transform-origin: left center;
    z-index: 1;
}

.ig-brain--trotting .ig-brain__paw--l {
    animation: ig-brain-trot-l 0.28s ease-in-out infinite;
}

.ig-brain--trotting .ig-brain__paw--r {
    animation: ig-brain-trot-r 0.28s ease-in-out infinite;
}

.ig-brain--trotting .ig-brain__tail {
    animation: ig-brain-tail 0.35s ease-in-out infinite;
}

@keyframes ig-brain-trot-l {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes ig-brain-trot-r {
    0%, 100% { transform: translateY(-3px); }
    50% { transform: translateY(0); }
}

@keyframes ig-brain-tail {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(18deg); }
}

.ig-brain--sniffing .ig-brain__head {
    animation: ig-brain-sniff 0.45s ease-in-out infinite;
}

.ig-brain--sniffing .ig-brain__snout::after {
    content: '~~';
    position: absolute;
    top: -10px;
    right: -8px;
    font-size: 0.45rem;
    color: rgba(100, 180, 255, 0.7);
    animation: ig-brain-sniff-puff 0.6s ease-out infinite;
}

@keyframes ig-brain-sniff {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(8deg) translateY(2px); }
}

@keyframes ig-brain-sniff-puff {
    0% { opacity: 0; transform: translateY(0); }
    40% { opacity: 0.8; }
    100% { opacity: 0; transform: translateY(-8px); }
}

.ig-brain--peek .ig-brain__body-wrap {
    animation: ig-brain-peek 0.7s ease-in-out infinite;
}

.ig-brain--peek .ig-brain__disguise {
    transform: translateX(-50%) rotate(-12deg);
}

@keyframes ig-brain-peek {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ── Dr. Claw (hiding) + Mad Cat ── */
.ig-claw-hide {
    position: fixed;
    left: 0;
    top: 0;
    width: 96px;
    height: 88px;
    transform: translate3d(var(--ig-x, -120px), var(--ig-y, 50vh), 0) scaleX(var(--ig-face, 1));
    transition: transform var(--ig-move-ms, 900ms) cubic-bezier(0.42, 0.01, 0.22, 1), opacity 0.35s ease;
    z-index: 10053;
    pointer-events: none;
    opacity: 1;
}

.ig-claw-hide--hidden {
    opacity: 0;
}

.ig-claw-hide__shadow {
    position: absolute;
    inset: -8px -12px -4px;
    background: radial-gradient(ellipse at 50% 40%, rgba(0, 0, 0, 0.55) 0%, transparent 72%);
    z-index: 0;
}

.ig-claw-hide__silhouette {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 46px;
    background: linear-gradient(180deg, #1a1220 0%, #0a060c 100%);
    border-radius: 50% 50% 42% 42%;
    z-index: 1;
    box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.6);
}

.ig-claw-hide__eye {
    position: absolute;
    top: 18px;
    width: 8px;
    height: 5px;
    background: #ff2244;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 34, 68, 0.95), 0 0 18px rgba(255, 34, 68, 0.45);
    animation: ig-claw-eye 2s ease-in-out infinite;
}

.ig-claw-hide__eye--l { left: 12px; }
.ig-claw-hide__eye--r { right: 12px; }

@keyframes ig-claw-eye {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.65; transform: scaleY(0.75); }
}

.ig-claw-hide__arm {
    position: absolute;
    right: -4px;
    bottom: 10px;
    width: 38px;
    height: 16px;
    transform: rotate(-8deg);
    z-index: 3;
    transition: transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.ig-claw-hide__gauntlet {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #3d7a48 0%, #2a5532 45%, #1e3d24 100%);
    border-radius: 8px 12px 10px 6px;
    border: 2px solid #8a9aaa;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.15), 0 4px 10px rgba(0, 0, 0, 0.35);
    position: relative;
}

.ig-claw-hide__gauntlet::before {
    content: '';
    position: absolute;
    inset: 3px 6px;
    border-top: 2px solid rgba(180, 190, 200, 0.45);
    border-radius: 4px;
}

.ig-claw-hide__gauntlet::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #2a5532, #1a3820);
    border-radius: 50% 50% 40% 40%;
    box-shadow: -8px 0 0 -2px #2a5532, -16px 2px 0 -3px #2a5532;
}

.ig-madcat {
    position: absolute;
    left: 4px;
    bottom: 2px;
    width: 38px;
    height: 34px;
    z-index: 4;
    transition: transform 0.4s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.ig-madcat__fur {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 35%, #fff 0%, #f0ebe3 55%, #ddd5c8 100%);
    border-radius: 50% 50% 45% 45%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.ig-madcat__fur::before,
.ig-madcat__fur::after {
    content: '';
    position: absolute;
    top: 2px;
    width: 10px;
    height: 14px;
    background: linear-gradient(180deg, #fff, #e8e0d4);
    border-radius: 50%;
}

.ig-madcat__fur::before { left: -2px; transform: rotate(-16deg); }
.ig-madcat__fur::after { right: -2px; transform: rotate(16deg); }

.ig-madcat__eye {
    position: absolute;
    top: 12px;
    width: 7px;
    height: 9px;
    background: #ffe066;
    border-radius: 50% 50% 40% 40%;
    border: 1px solid #333;
    z-index: 2;
}

.ig-madcat__eye::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 5px;
    background: #1a1a1a;
    border-radius: 50%;
    top: 2px;
    left: 2px;
}

.ig-madcat__eye--l {
    left: 8px;
    transform: rotate(-12deg);
}

.ig-madcat__eye--r {
    right: 8px;
    transform: rotate(12deg);
}

.ig-madcat__nose {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 4px;
    background: #ffb6c1;
    border-radius: 50%;
    z-index: 2;
}

.ig-claw-hide--spying .ig-claw-hide__arm {
    transform: rotate(-18deg) translateX(6px);
    animation: ig-claw-reach 1.2s ease-in-out infinite;
}

.ig-claw-hide--spying .ig-madcat {
    animation: ig-madcat-hiss 0.55s ease-in-out infinite;
}

@keyframes ig-claw-reach {
    0%, 100% { transform: rotate(-18deg) translateX(4px); }
    50% { transform: rotate(-24deg) translateX(10px); }
}

@keyframes ig-madcat-hiss {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.04); }
}

.ig-claw-hide--duck {
    opacity: 0.08 !important;
    transition-duration: 0.28s !important;
}

.ig-claw-hide--duck .ig-claw-hide__silhouette,
.ig-claw-hide--duck .ig-claw-hide__arm,
.ig-claw-hide--duck .ig-madcat {
    opacity: 0;
    transform: translateY(18px) scale(0.75);
    transition: opacity 0.25s ease, transform 0.28s ease;
}

.ig-claw-hide--spying .ig-claw-hide__silhouette {
    animation: ig-claw-peek 1.4s ease-in-out infinite;
}

@keyframes ig-claw-peek {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(3px); }
}

.ig-speech--claw {
    font-size: 0.74rem;
    border-color: #4a2040;
    background: #1a0f18;
    color: #ffb3cc;
    z-index: 10064;
    font-style: italic;
}

.ig-speech--cat {
    font-size: 0.62rem;
    border-color: #888;
    background: #fff8f0;
    color: #664422;
    z-index: 10064;
}

/* ── Dr. Claw mesh radio + page repeaters ── */
.ig-claw-radio {
    position: absolute;
    left: -58px;
    bottom: 0;
    width: 62px;
    height: 54px;
    z-index: 6;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.ig-claw-hide--transmitting .ig-claw-radio {
    opacity: 1;
}

.ig-claw-radio__unit {
    position: absolute;
    left: 8px;
    bottom: 2px;
    width: 46px;
    height: 34px;
    background: linear-gradient(180deg, #2a3438 0%, #141a1c 100%);
    border: 2px solid #6a7880;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ig-claw-radio__led {
    position: absolute;
    top: 4px;
    right: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff3344;
    box-shadow: 0 0 8px rgba(255, 51, 68, 0.95);
    animation: ig-radio-led 0.45s ease-in-out infinite;
}

.ig-claw-radio__screen {
    position: absolute;
    left: 5px;
    top: 5px;
    width: 28px;
    height: 12px;
    font-size: 0.42rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #7dffb2;
    background: #0a1810;
    border: 1px solid #3a6850;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ig-radio-screen 0.28s steps(2) infinite;
}

.ig-claw-radio__keys {
    position: absolute;
    left: 5px;
    bottom: 4px;
    width: 34px;
    height: 8px;
    background: repeating-linear-gradient(90deg, #4a5558 0 4px, transparent 4px 6px);
    border-radius: 2px;
    animation: ig-radio-keys 0.15s steps(3) infinite;
}

.ig-claw-radio__antenna {
    position: absolute;
    bottom: 28px;
    width: 3px;
    height: 28px;
    background: linear-gradient(180deg, #b8c4cc, #5a6870);
    border-radius: 2px;
    transform-origin: bottom center;
}

.ig-claw-radio__antenna--l {
    left: 10px;
    transform: rotate(-14deg);
    animation: ig-antenna-sway-l 1.1s ease-in-out infinite;
}

.ig-claw-radio__antenna--r {
    left: 22px;
    height: 34px;
    transform: rotate(10deg);
    animation: ig-antenna-sway-r 0.95s ease-in-out infinite;
}

.ig-claw-radio__antenna::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff4455;
    box-shadow: 0 0 6px rgba(255, 68, 85, 0.8);
}

.ig-claw-radio__wave {
    position: absolute;
    left: 24px;
    bottom: 36px;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 68, 85, 0.55);
    border-radius: 50%;
    opacity: 0;
}

.ig-claw-hide--transmitting .ig-claw-radio__wave--1 {
    animation: ig-radio-wave 1.4s ease-out infinite;
}

.ig-claw-hide--transmitting .ig-claw-radio__wave--2 {
    animation: ig-radio-wave 1.4s ease-out infinite 0.45s;
}

.ig-mesh-spam {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10052;
}

.ig-mesh-spam__links {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.ig-mesh-link {
    stroke: rgba(255, 68, 85, 0.28);
    stroke-width: 1.5;
    stroke-dasharray: 6 8;
    animation: ig-mesh-link-pulse 1.6s ease-in-out infinite;
}

.ig-stage--mesh-spam .ig-mesh-link {
    stroke: rgba(255, 68, 85, 0.42);
}

.ig-mesh-spam__repeaters,
.ig-mesh-spam__bursts {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.ig-repeater {
    position: fixed;
    left: var(--ig-rx, 0px);
    top: var(--ig-ry, 0px);
    width: 28px;
    height: 36px;
    transform: translate(-50%, -50%);
    z-index: 10052;
    opacity: 0.88;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.ig-repeater__mast {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 4px;
    height: 26px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #8898a0, #4a5860);
    border-radius: 2px;
}

.ig-repeater__dish {
    position: absolute;
    left: 50%;
    top: 0;
    width: 18px;
    height: 10px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #c8d4dc, #687880);
    border-radius: 50% 50% 40% 40%;
    border: 1px solid #9aacb4;
}

.ig-repeater__led {
    position: absolute;
    left: 50%;
    top: 12px;
    width: 5px;
    height: 5px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: #556068;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.ig-repeater__tag {
    position: absolute;
    left: 50%;
    bottom: -12px;
    transform: translateX(-50%);
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(255, 100, 120, 0.75);
    white-space: nowrap;
}

.ig-repeater__toast {
    position: absolute;
    left: 50%;
    top: -18px;
    transform: translateX(-50%);
    font-size: 0.48rem;
    font-weight: 800;
    color: #ff5566;
    text-shadow: 0 0 6px rgba(255, 85, 102, 0.65);
    white-space: nowrap;
    opacity: 0;
}

.ig-repeater--relay .ig-repeater__led {
    background: #ff4455;
    box-shadow: 0 0 10px rgba(255, 68, 85, 0.95);
    animation: ig-repeater-blink 0.35s ease-in-out 2;
}

.ig-repeater--relay .ig-repeater__toast {
    opacity: 1;
    animation: ig-repeater-toast 0.5s ease-out forwards;
}

.ig-repeater--relay {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(255, 68, 85, 0.45));
}

.ig-spam-burst {
    position: fixed;
    left: var(--ig-fx, 0px);
    top: var(--ig-fy, 0px);
    transform: translate(-50%, -50%);
    padding: 2px 6px;
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    background: rgba(180, 40, 60, 0.92);
    border: 1px solid rgba(255, 120, 140, 0.65);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255, 68, 85, 0.55);
    z-index: 10054;
    animation: ig-spam-fly 0.88s linear forwards;
    white-space: nowrap;
}

@keyframes ig-radio-led {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@keyframes ig-radio-screen {
    0%, 100% { color: #7dffb2; }
    50% { color: #ff8899; }
}

@keyframes ig-radio-keys {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@keyframes ig-antenna-sway-l {
    0%, 100% { transform: rotate(-14deg); }
    50% { transform: rotate(-20deg); }
}

@keyframes ig-antenna-sway-r {
    0%, 100% { transform: rotate(10deg); }
    50% { transform: rotate(16deg); }
}

@keyframes ig-radio-wave {
    0% { opacity: 0.75; transform: scale(0.4); }
    100% { opacity: 0; transform: scale(2.8); }
}

@keyframes ig-mesh-link-pulse {
    0%, 100% { stroke-opacity: 0.35; stroke-dashoffset: 0; }
    50% { stroke-opacity: 0.75; stroke-dashoffset: -14; }
}

@keyframes ig-repeater-blink {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.35); }
}

@keyframes ig-repeater-toast {
    0% { opacity: 0; transform: translateX(-50%) translateY(4px); }
    30% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-6px); }
}

@keyframes ig-spam-fly {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    85% {
        opacity: 0.85;
    }
    100% {
        transform: translate(calc(-50% + var(--ig-dx, 0px)), calc(-50% + var(--ig-dy, 0px))) scale(0.72);
        opacity: 0;
    }
}

/* ── Dr. Claw bombs (planted behind dashboard cards) ── */
.ig-bomb-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10058;
}

.card.ig-bomb-planted,
.live-traffic-terminal.ig-bomb-planted {
    position: relative;
}

.ig-bomb {
    position: fixed;
    left: var(--ig-bx, 0px);
    top: var(--ig-by, 0px);
    width: 42px;
    height: 34px;
    transform: translateY(50%);
    z-index: 10058;
    pointer-events: none;
}

.ig-bomb__lip {
    position: absolute;
    left: -8px;
    top: -10px;
    width: var(--ig-bomb-lip, 90px);
    height: 14px;
    background: var(--ig-card-bg, #fff);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    z-index: 3;
}

.ig-bomb__body {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 38px;
    height: 30px;
    background: radial-gradient(circle at 35% 30%, #3a3a3a 0%, #121212 72%);
    border: 2px solid #555;
    border-radius: 50% 50% 46% 46%;
    box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.55), 0 3px 8px rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.ig-bomb__label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.42rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #ff4455;
}

.ig-bomb__fuse {
    position: absolute;
    right: -8px;
    top: 2px;
    width: 16px;
    height: 3px;
    background: #c9a066;
    border-radius: 2px;
    transform: rotate(-24deg);
    transform-origin: left center;
}

.ig-bomb__spark {
    position: absolute;
    right: -12px;
    top: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffaa22;
    opacity: 0;
}

.ig-bomb--planting {
    animation: ig-bomb-plant 0.65s ease-out forwards;
}

.ig-bomb--armed .ig-bomb__spark {
    opacity: 1;
    animation: ig-bomb-spark 0.35s ease-in-out infinite;
}

.ig-bomb--armed .ig-bomb__fuse {
    animation: ig-bomb-fuse 0.55s ease-in-out infinite;
}

.ig-bomb-blast {
    position: fixed;
    left: var(--ig-bx, 0px);
    top: var(--ig-by, 0px);
    width: 120px;
    height: 120px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10059;
}

.ig-bomb-blast--mega {
    width: var(--ig-blast-w, 280px);
    height: var(--ig-blast-h, 220px);
    z-index: 10065;
}

.ig-bomb-blast__flash {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle, rgba(255, 240, 200, 0.95) 0%, rgba(255, 120, 40, 0.55) 35%, transparent 72%);
    opacity: 0;
    animation: ig-bomb-flash 0.55s ease-out forwards;
}

.ig-bomb-blast__core {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 42%;
    height: 42%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #fff 0%, #ff7722 35%, rgba(255, 40, 0, 0.2) 70%, transparent 100%);
    border-radius: 50%;
    animation: ig-bomb-core 0.65s ease-out forwards;
}

.ig-bomb-blast__ring {
    position: absolute;
    inset: 0;
    border: 4px solid rgba(255, 120, 40, 0.9);
    border-radius: 50%;
    animation: ig-bomb-ring 1.15s ease-out forwards;
}

.ig-bomb-blast__ring--2 {
    animation-delay: 0.1s;
    border-color: rgba(255, 60, 30, 0.75);
    border-width: 5px;
}

.ig-bomb-blast__ring--3 {
    animation-delay: 0.2s;
    border-color: rgba(255, 200, 80, 0.55);
    border-width: 3px;
}

.ig-bomb-blast__smoke {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 70%;
    height: 70%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(80, 80, 80, 0.85) 0%, transparent 72%);
    animation: ig-bomb-smoke 1.35s ease-out forwards;
}

.ig-bomb-blast__smoke--2 {
    animation-delay: 0.15s;
    width: 95%;
    height: 95%;
}

.ig-bomb-blast__text {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #ff5522;
    text-shadow: 0 0 12px rgba(255, 85, 34, 0.85), 2px 2px 0 #1a1a1a;
    animation: ig-bomb-text 0.75s ease-out forwards;
}

.ig-bomb-blast--mega .ig-bomb-blast__text {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    letter-spacing: 0.1em;
    animation: ig-bomb-text-mega 1.05s ease-out forwards;
}

.ig-stage--mega-bang {
    animation: ig-stage-shake 0.55s ease-in-out;
}

.ig-stage--mega-bang .ig-flash {
    animation-duration: 0.45s !important;
    opacity: 0.95 !important;
}

.card.ig-card--boom,
.live-traffic-terminal.ig-card--boom {
    animation: ig-card-boom-shake 0.65s ease-in-out;
    box-shadow: 0 0 0 3px rgba(255, 90, 40, 0.55), 0 12px 40px rgba(255, 80, 30, 0.35) !important;
    z-index: 10054 !important;
}

.card.ig-card--destroyed,
.live-traffic-terminal.ig-card--destroyed {
    position: relative;
    overflow: hidden;
    animation: ig-card-destroy 1.15s ease-out forwards;
    pointer-events: none;
    filter: grayscale(0.85) brightness(0.45);
    box-shadow: inset 0 0 0 2px rgba(40, 40, 40, 0.55), 0 8px 24px rgba(0, 0, 0, 0.25) !important;
}

.card.ig-card--destroyed::before,
.live-traffic-terminal.ig-card--destroyed::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(30, 30, 30, 0.92) 0%, rgba(60, 45, 40, 0.88) 100%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 8px);
    z-index: 6;
    animation: ig-card-rubble-in 0.8s ease-out forwards;
}

.card.ig-card--destroyed::after,
.live-traffic-terminal.ig-card--destroyed::after {
    content: 'DESTROYED';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 7;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.22em;
    color: rgba(255, 120, 80, 0.85);
    text-shadow: 0 0 12px rgba(255, 80, 40, 0.45);
}

.card.ig-card--destroyed > *,
.live-traffic-terminal.ig-card--destroyed > * {
    animation: ig-card-content-vanish 0.55s ease-out forwards;
}

@keyframes ig-bomb-plant {
    0% { opacity: 0; transform: translateY(80%) scale(0.5); }
    100% { opacity: 1; transform: translateY(50%) scale(1); }
}

@keyframes ig-bomb-spark {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.55; }
}

@keyframes ig-bomb-fuse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

@keyframes ig-bomb-ring {
    0% { transform: scale(0.15); opacity: 1; }
    100% { transform: scale(1.55); opacity: 0; }
}

@keyframes ig-bomb-flash {
    0% { opacity: 0; transform: scale(0.6); }
    20% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.25); }
}

@keyframes ig-bomb-core {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
    25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); }
}

@keyframes ig-bomb-smoke {
    0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.35); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.85); }
}

@keyframes ig-bomb-text {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
    25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
    100% { opacity: 0; transform: translate(-50%, -70%) scale(1); }
}

@keyframes ig-bomb-text-mega {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.25) rotate(-8deg); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.25) rotate(3deg); }
    100% { opacity: 0; transform: translate(-50%, -85%) scale(1.05) rotate(0deg); }
}

@keyframes ig-stage-shake {
    0%, 100% { transform: translate(0, 0); }
    15% { transform: translate(-6px, 3px); }
    30% { transform: translate(7px, -4px); }
    45% { transform: translate(-5px, -2px); }
    60% { transform: translate(4px, 4px); }
    75% { transform: translate(-3px, 1px); }
}

@keyframes ig-card-destroy {
    0% { transform: scale(1); max-height: 2000px; opacity: 1; }
    20% { transform: scale(1.03); opacity: 1; }
    55% { transform: scale(0.97) rotate(-0.6deg); opacity: 0.75; }
    100% { transform: scale(0.96); max-height: 72px; opacity: 0.65; margin-bottom: 0.5rem !important; }
}

@keyframes ig-card-rubble-in {
    0% { opacity: 0; }
    40% { opacity: 0.85; }
    100% { opacity: 1; }
}

@keyframes ig-card-content-vanish {
    0% { opacity: 1; transform: scale(1); filter: blur(0); }
    100% { opacity: 0; transform: scale(0.92); filter: blur(4px); }
}

@keyframes ig-card-boom-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px) rotate(-0.4deg); }
    40% { transform: translateX(4px) rotate(0.4deg); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}

html.ig-klingon-mode {
    letter-spacing: 0.02em;
}

html.ig-klingon-mode body {
    transition: filter 0.35s ease;
}

html.ig-klingon-mode .main-sidebar,
html.ig-klingon-mode .content-wrapper,
html.ig-klingon-mode .main-header {
    filter: hue-rotate(18deg) saturate(1.08);
}

@media (prefers-reduced-motion: reduce) {
    .ig-stage,
    .ig-stage * {
        animation: none !important;
        transition: none !important;
    }
}
