html.portfolio-robot-lab-page body {
    overflow-x: hidden;
    background: #070908;
}

html.portfolio-robot-lab-page header {
    border-color: rgba(242, 230, 190, 0.12);
    background: rgba(7, 9, 8, 0.86);
    color: #f4ead1;
    backdrop-filter: blur(18px);
}

html.portfolio-robot-lab-page header a,
html.portfolio-robot-lab-page header button,
html.portfolio-robot-lab-page header span {
    color: inherit;
}

.robot-lab {
    --ink: #f4ead1;
    --muted: rgba(244, 234, 209, 0.62);
    --dim: rgba(244, 234, 209, 0.38);
    --line: rgba(244, 234, 209, 0.14);
    --gold: #d8b75f;
    --cyan: #70d9f2;
    --orange: #ff914d;
    min-height: calc(100vh - 3.5rem);
    padding: 42px max(18px, calc((100vw - 1360px) / 2)) 48px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(244, 234, 209, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(244, 234, 209, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 72% 24%, rgba(112, 217, 242, 0.11), transparent 28%),
        linear-gradient(135deg, #070908 0%, #10140f 52%, #080a08 100%);
    background-size: 54px 54px, 54px 54px, auto, auto;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        "PingFang SC", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
}

.robot-lab *,
.robot-lab *::before,
.robot-lab *::after {
    box-sizing: border-box;
}

.robot-lab-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.robot-lab-kicker {
    margin: 0 0 12px;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.robot-lab-kicker::before {
    display: inline-block;
    width: 28px;
    height: 1px;
    margin-right: 10px;
    vertical-align: middle;
    background: var(--gold);
    content: "";
}

.robot-lab h1 {
    margin: 0;
    max-width: 760px;
    color: #fff5d8;
    font-size: clamp(2.6rem, 6vw, 5.2rem);
    font-weight: 880;
    line-height: 1.02;
}

.robot-lab h2 {
    margin: 0;
    color: #fff5d8;
    font-size: 2rem;
    font-weight: 850;
}

.robot-lab p {
    margin: 16px 0 0;
    max-width: 620px;
    color: var(--muted);
    line-height: 1.8;
}

.robot-lab-link,
.robot-lab-actions button {
    min-height: 42px;
    border: 1px solid rgba(244, 234, 209, 0.18);
    border-radius: 8px;
    padding: 0 15px;
    background: rgba(244, 234, 209, 0.055);
    color: #f4ead1;
    font-size: 0.88rem;
    font-weight: 850;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.robot-lab-link:hover,
.robot-lab-actions button:hover,
.robot-lab-actions button.is-active {
    transform: translateY(-1px);
    border-color: rgba(112, 217, 242, 0.52);
    background: rgba(112, 217, 242, 0.1);
}

.robot-lab-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 16px;
    align-items: stretch;
}

.robot-lab-control,
.robot-lab-stage {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(13, 17, 13, 0.76);
    box-shadow:
        inset 0 1px 0 rgba(244, 234, 209, 0.09),
        0 28px 92px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(18px);
}

.robot-lab-control {
    padding: 22px;
}

.robot-lab-actions {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.robot-lab-notes {
    display: grid;
    gap: 10px;
    margin-top: 26px;
}

.robot-lab-notes div {
    border: 1px solid rgba(244, 234, 209, 0.12);
    border-radius: 8px;
    padding: 13px;
    background: rgba(244, 234, 209, 0.04);
}

.robot-lab-notes strong,
.robot-lab-notes span {
    display: block;
}

.robot-lab-notes strong {
    color: #fff5d8;
    font-size: 0.9rem;
}

.robot-lab-notes span {
    margin-top: 7px;
    color: var(--dim);
    font-size: 0.78rem;
    line-height: 1.6;
}

.robot-lab-stage {
    position: relative;
    min-height: 620px;
    overflow: hidden;
}

.robot-lab-stage::before {
    position: absolute;
    inset: 18px;
    z-index: 2;
    border: 1px solid rgba(244, 234, 209, 0.08);
    border-radius: 8px;
    pointer-events: none;
    content: "";
}

.robot-lab-stage::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    content: "";
    background: linear-gradient(180deg, transparent, rgba(112, 217, 242, 0.07), transparent);
    transform: translateY(-100%);
    animation: robot-lab-scan 5s linear infinite;
}

.robot-lab-stage-head {
    position: absolute;
    left: 22px;
    right: 22px;
    top: 20px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
}

.robot-lab-stage-head span,
.robot-lab-stage-head em {
    color: rgba(244, 234, 209, 0.46);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 900;
}

.robot-lab-stage-head strong {
    display: block;
    margin-top: 5px;
    color: #fff5d8;
    font-size: 1rem;
}

.robot-lab-stage-head em {
    align-self: start;
    border: 1px solid rgba(112, 217, 242, 0.3);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(7, 9, 7, 0.7);
    color: #c9f6ff;
}

#robot-lab-three,
#robot-lab-pixi {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: 620px;
}

.robot-lab-source {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 18px;
    z-index: 3;
    max-width: none;
    border: 1px solid rgba(244, 234, 209, 0.12);
    border-radius: 8px;
    padding: 12px 13px;
    background: rgba(5, 7, 6, 0.72);
    color: rgba(244, 234, 209, 0.58);
    font-size: 0.78rem;
    line-height: 1.45;
}

@media (max-width: 1120px) {
    .robot-lab-layout {
        grid-template-columns: 1fr;
    }

    .robot-lab-control {
        order: -1;
    }
}

@media (max-width: 640px) {
    .robot-lab {
        padding: 30px 16px 36px;
    }

    .robot-lab-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .robot-lab-link {
        display: inline-grid;
        place-items: center;
        width: 100%;
    }

    .robot-lab-stage,
    #robot-lab-three,
    #robot-lab-pixi {
        min-height: 500px;
        height: 500px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .robot-lab-link,
    .robot-lab-actions button {
        transition: none;
    }

    .robot-lab-stage::after {
        animation: none;
    }
}

@keyframes robot-lab-scan {
    0% {
        opacity: 0;
        transform: translateY(-100%);
    }
    20%,
    70% {
        opacity: 0.72;
    }
    100% {
        opacity: 0;
        transform: translateY(100%);
    }
}
