:root {
    --ppb-bg-deep: #041027;
    --ppb-bg-mid: #0b1d42;
    --ppb-bg-soft: #153267;
    --ppb-stage-navy: rgba(6, 20, 49, 0.86);
    --ppb-stage-panel: rgba(11, 26, 58, 0.82);
    --ppb-stage-border: rgba(148, 225, 255, 0.18);
    --ppb-gold: #ffd45c;
    --ppb-cyan: #6ee7ff;
    --ppb-coral: #ff8d73;
    --ppb-display-font: "Jua", "Gmarket Sans", "Malgun Gothic", sans-serif;
    --ppb-body-font: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.ppb-root {
    color: #f9fbff;
    font-family: var(--ppb-body-font);
    overflow-x: hidden;
    overflow-y: auto;
    padding: clamp(0.8rem, 2vw, 1.4rem);
}

.ppb-root::after {
    content: "";
    position: fixed;
    inset: auto -12vw -18vh auto;
    width: 38vw;
    height: 38vw;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 141, 115, 0.22), transparent 66%);
    filter: blur(14px);
    pointer-events: none;
    z-index: 0;
}

.ppb-topbar {
    gap: 1rem;
    border-radius: 1.45rem;
    background:
        linear-gradient(145deg, rgba(8, 22, 54, 0.94), rgba(5, 16, 39, 0.82)),
        radial-gradient(circle at top right, rgba(110, 231, 255, 0.2), transparent 34%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.ppb-top-banner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
    gap: 1rem;
}

.ppb-top-banner-copy,
.ppb-top-banner-stage {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.ppb-top-banner-copy {
    background:
        radial-gradient(circle at top left, rgba(255, 212, 92, 0.18), transparent 32%),
        linear-gradient(160deg, rgba(13, 34, 78, 0.95), rgba(6, 18, 45, 0.88));
}

.ppb-top-banner-stage {
    background:
        radial-gradient(circle at 80% 18%, rgba(110, 231, 255, 0.2), transparent 28%),
        linear-gradient(180deg, rgba(14, 35, 77, 0.92), rgba(9, 23, 54, 0.84));
}

.ppb-top-banner-copy h1,
.ppb-stage-title {
    margin: 0;
    font-family: var(--ppb-display-font);
    letter-spacing: 0.01em;
}

.ppb-top-banner-copy h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.03;
}

.ppb-top-banner-copy p,
.ppb-stage-desc {
    margin: 0.55rem 0 0;
    color: rgba(245, 249, 255, 0.82);
    line-height: 1.55;
}

.ppb-hero-badge,
.ppb-panel-kicker,
.ppb-stage-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
    padding: 0.3rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff4bf;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.ppb-stage-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.ppb-stage-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.ppb-stage-tag {
    border-radius: 999px;
    padding: 0.36rem 0.8rem;
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.82rem;
    font-weight: 700;
}

.ppb-top-main {
    align-items: flex-end;
}

.ppb-brand h2 {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 800;
}

.ppb-brand p {
    margin-top: 0.18rem;
    color: rgba(255, 255, 255, 0.74);
}

.ppb-top-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ppb-audio-btn[aria-pressed="true"] {
    background: linear-gradient(135deg, rgba(255, 212, 92, 0.22), rgba(110, 231, 255, 0.18));
    border-color: rgba(255, 212, 92, 0.36);
}

.ppb-mode-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.65rem;
}

.ppb-mode-tab {
    min-height: 5.4rem;
    border-radius: 1.1rem;
    padding: 0.85rem 0.95rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.72rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
}

.ppb-mode-tab-copy {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.ppb-mode-tab-copy strong {
    color: #fef7c9;
    font-size: 0.95rem;
}

.ppb-mode-tab-copy small {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.74rem;
    line-height: 1.35;
}

.ppb-mode-tab-icon {
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 212, 92, 0.18), rgba(110, 231, 255, 0.22));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-size: 1.25rem;
}

.ppb-mode-tab-icon svg {
    width: 1.38rem;
    height: 1.38rem;
    color: #fff4bf;
    filter: drop-shadow(0 0 10px rgba(110, 231, 255, 0.2));
}

.ppb-mode-tab.is-active {
    transform: translateY(-2px);
    border-color: rgba(110, 231, 255, 0.36);
    background:
        linear-gradient(145deg, rgba(255, 212, 92, 0.2), rgba(110, 231, 255, 0.16)),
        rgba(255, 255, 255, 0.07);
    box-shadow: 0 18px 38px rgba(7, 18, 43, 0.38);
}

.ppb-mode-tab.is-active .ppb-mode-tab-icon {
    background: linear-gradient(135deg, rgba(255, 212, 92, 0.42), rgba(110, 231, 255, 0.34));
}

.ppb-screen {
    min-height: 0;
    align-items: flex-start;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
}

.ppb-setup-shell,
.ppb-universe-shell,
.pbl-setup-shell,
.pbl-stage-shell,
.pps-stage-shell,
.ppt-stage-shell,
.ppm-stage-shell,
.ppr-shell {
    width: min(1640px, 100%);
    gap: 1rem;
}

.ppb-panel,
.ppb-history-panel,
.pbl-side-panel,
.pps-side-panel,
.ppt-side-panel,
.ppm-side-panel,
.ppr-side-panel {
    background: var(--ppb-stage-panel);
    border: 1px solid var(--ppb-stage-border);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
}

.ppb-panel-info h2,
.ppb-universe-title,
.pbl-stage-title,
.pps-stage-title,
.ppt-stage-title,
.ppm-stage-title,
.ppr-title {
    font-family: var(--ppb-display-font);
    letter-spacing: 0.01em;
}

.ppb-panel-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.ppb-preview-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 0.36rem 0.78rem;
    background: rgba(110, 231, 255, 0.14);
    color: #d8f7ff;
    font-size: 0.8rem;
    font-weight: 700;
}

.ppb-preview-card {
    margin-top: 1rem;
    border-radius: 1rem;
    padding: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 0.85rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(110, 231, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ppb-preview-stage {
    min-height: 140px;
    position: relative;
    border-radius: 1rem;
    background:
        radial-gradient(circle at center, rgba(110, 231, 255, 0.18), transparent 35%),
        linear-gradient(180deg, rgba(9, 25, 58, 0.94), rgba(4, 14, 35, 0.9));
    overflow: hidden;
}

.ppb-preview-star {
    position: absolute;
    left: 20%;
    top: 48%;
    font-size: 2rem;
    filter: drop-shadow(0 0 12px rgba(255, 212, 92, 0.5));
    animation: ppbPreviewFloat 2.6s ease-in-out infinite;
}

.ppb-preview-star-cyan {
    left: 62%;
    top: 30%;
    animation-delay: 0.6s;
}

.ppb-preview-star-coral {
    left: 48%;
    top: 66%;
    animation-delay: 1.2s;
}

.ppb-preview-copy strong {
    display: block;
    font-size: 1rem;
}

.ppb-preview-copy p {
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
}

.ppb-universe-shell,
.pbl-stage-shell,
.pps-stage-shell,
.ppt-stage-shell,
.ppm-stage-shell,
.ppr-shell {
    grid-template-columns: minmax(0, 1.88fr) minmax(248px, 320px);
    align-items: start;
}

.ppb-universe-main,
.pbl-stage-main,
.pps-stage-main,
.ppt-stage-main,
.ppm-stage-main,
.ppr-main {
    min-width: 0;
    border-radius: 1.35rem;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(8, 22, 52, 0.72), rgba(5, 16, 39, 0.68));
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.ppb-history-panel,
.pbl-side-panel,
.pps-side-panel,
.ppt-side-panel,
.ppm-side-panel,
.ppr-side-panel {
    position: sticky;
    top: 1rem;
    border-radius: 1.2rem;
    padding: 0.86rem;
}

.ppb-bottom-actions,
.pps-bottom-actions,
.ppt-bottom-actions,
.ppm-bottom-actions,
.ppr-bottom-actions {
    flex-wrap: wrap;
    gap: 0.55rem;
}

.ppb-bottom-actions > *,
.pps-bottom-actions > *,
.ppt-bottom-actions > *,
.ppm-bottom-actions > *,
.ppr-bottom-actions > * {
    flex: 1 1 168px;
}

.ppb-chip,
.ppr-classroom-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ppb-orb-grid {
    min-height: clamp(480px, 62vh, 760px);
    border-radius: 1.25rem;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.07), transparent 40%),
        linear-gradient(180deg, rgba(9, 24, 58, 0.92), rgba(3, 11, 27, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ppb-picked-card,
.ppb-live-card,
.pbl-live-card,
.pps-live-card,
.ppt-live-card,
.ppm-live-card,
.ppr-live-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ppb-result-modal {
    backdrop-filter: blur(8px);
}

.ppb-result-panel {
    position: relative;
    overflow: hidden;
    padding-top: 2.3rem;
    background:
        radial-gradient(circle at top, rgba(255, 212, 92, 0.26), transparent 28%),
        linear-gradient(180deg, rgba(13, 32, 72, 0.98), rgba(7, 18, 44, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.ppb-result-source {
    margin: 0;
    color: rgba(110, 231, 255, 0.92);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ppb-result-name {
    font-family: var(--ppb-display-font);
    text-shadow: 0 0 28px rgba(255, 212, 92, 0.22);
}

.ppb-result-actions {
    margin-top: 1.2rem;
}

.ppb-result-burst {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ppb-result-burst span {
    position: absolute;
    left: 50%;
    top: 43%;
    width: 2px;
    height: clamp(138px, 18vw, 216px);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 212, 92, 0), rgba(255, 212, 92, 0.88), rgba(110, 231, 255, 0));
    transform-origin: center bottom;
    opacity: 0.9;
}

.ppb-result-burst span:nth-child(1) { --burst-angle: 0deg; }
.ppb-result-burst span:nth-child(2) { --burst-angle: 30deg; }
.ppb-result-burst span:nth-child(3) { --burst-angle: 60deg; }
.ppb-result-burst span:nth-child(4) { --burst-angle: 90deg; }
.ppb-result-burst span:nth-child(5) { --burst-angle: 120deg; }
.ppb-result-burst span:nth-child(6) { --burst-angle: 150deg; }

.ppb-result-modal:not(.is-hidden) .ppb-result-burst span {
    animation: ppbBurstReveal 820ms ease-out both;
}

.ppr-card-front,
.ppr-card-back {
    background:
        linear-gradient(180deg, rgba(18, 36, 80, 0.92), rgba(7, 18, 46, 0.9));
}

.ppr-card-icon,
.ppr-card-cta {
    color: #ffe8a6;
}

.ppb-root.ppb-audio-off .ppb-brand-icon {
    filter: grayscale(0.2);
    opacity: 0.72;
}

@keyframes ppbPreviewFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.08); }
}

@keyframes ppbBurstReveal {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scaleY(0.2) rotate(var(--burst-angle, 0deg));
    }
    100% {
        opacity: 0.86;
        transform: translate(-50%, -50%) scaleY(1) rotate(var(--burst-angle, 0deg));
    }
}

@media (max-width: 1380px) {
    .ppb-mode-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {
    .ppb-top-banner,
    .ppb-universe-shell,
    .pbl-stage-shell,
    .pps-stage-shell,
    .ppt-stage-shell,
    .ppm-stage-shell,
    .ppr-shell {
        grid-template-columns: 1fr;
    }

    .ppb-history-panel,
    .pbl-side-panel,
    .pps-side-panel,
    .ppt-side-panel,
    .ppm-side-panel,
    .ppr-side-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    .ppb-top-banner {
        gap: 0.85rem;
    }

    .ppb-top-main {
        align-items: flex-start;
    }

    .ppb-top-controls {
        width: 100%;
        justify-content: stretch;
    }

    .ppb-top-controls > * {
        flex: 1 1 calc(50% - 0.4rem);
    }

    .ppb-mode-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ppb-mode-tab {
        min-height: 4.8rem;
    }

    .ppb-preview-card {
        grid-template-columns: 1fr;
    }

    .ppb-bottom-actions > *,
    .pps-bottom-actions > *,
    .ppt-bottom-actions > *,
    .ppm-bottom-actions > *,
    .ppr-bottom-actions > * {
        flex-basis: 100%;
    }
}

/* Premium Show v2 overrides */

.ppb-host-shell {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr);
    gap: 1rem;
}

.ppb-host-console {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.05rem;
    border-radius: 1.25rem;
    background:
        linear-gradient(180deg, rgba(7, 20, 50, 0.96), rgba(5, 15, 38, 0.9)),
        radial-gradient(circle at top left, rgba(255, 212, 92, 0.14), transparent 30%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ppb-brand {
    align-items: flex-start;
}

.ppb-brand-kicker {
    margin: 0 0 0.2rem;
    color: rgba(110, 231, 255, 0.88);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ppb-host-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ppb-host-kpi {
    display: inline-flex;
    align-items: center;
    min-height: 2.1rem;
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
    font-weight: 700;
}

.ppb-host-guide {
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.ppb-host-guide summary,
.ppb-side-disclosure summary {
    cursor: pointer;
    padding: 0.82rem 0.95rem;
    color: #fff4bf;
    font-weight: 800;
    list-style: none;
}

.ppb-host-guide summary::-webkit-details-marker,
.ppb-side-disclosure summary::-webkit-details-marker {
    display: none;
}

.ppb-host-guide-body {
    padding: 0 0.95rem 0.88rem;
}

.ppb-host-guide-body p {
    margin: 0.32rem 0;
    color: rgba(245, 249, 255, 0.78);
    line-height: 1.5;
}

.ppb-stage-reassurance {
    margin: 0.9rem 0 0;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.5;
}

.ppb-stage-trust {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    max-width: 46rem;
    color: rgba(245, 249, 255, 0.8);
}

.ppb-stage-trust strong {
    color: #fff4bf;
    font-size: 0.88rem;
}

.ppb-mode-tabs {
    gap: 0.72rem;
}

.ppb-mode-tab {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ppb-mode-tab::after {
    content: "";
    position: absolute;
    inset: auto -15% -50% auto;
    width: 6rem;
    height: 6rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 212, 92, 0.18), transparent 70%);
    pointer-events: none;
}

.ppb-side-disclosure {
    margin-top: 0.8rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.ppb-side-disclosure .ppb-history-box,
.ppb-side-disclosure .pbl-history-box,
.ppb-side-disclosure .pps-history-box,
.ppb-side-disclosure .ppt-history-box,
.ppb-side-disclosure .ppm-history-box,
.ppb-side-disclosure .ppr-history-box {
    margin-top: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.ppb-result-panel {
    width: min(1040px, calc(100% - 1.2rem));
    min-height: min(76vh, 680px);
    padding: 2.45rem 2.1rem 2.15rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    text-align: center;
    transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.ppb-result-phase {
    margin: 0;
    color: rgba(110, 231, 255, 0.92);
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ppb-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.3rem;
    margin-top: 0;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 212, 92, 0.22), rgba(110, 231, 255, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff8d3;
    font-size: 0.9rem;
    font-weight: 800;
    transition: opacity 220ms ease, transform 220ms ease, filter 220ms ease;
}

.ppb-result-name {
    margin-top: 0;
    font-size: clamp(3.2rem, 10vw, 6.6rem);
    line-height: 0.95;
    letter-spacing: 0.01em;
    transition: opacity 220ms ease, transform 220ms ease, filter 220ms ease;
}

.ppb-result-compliment {
    max-width: 34rem;
    margin: 0.95rem auto 0;
    color: #ffeab1;
    font-size: clamp(1rem, 1.7vw, 1.2rem);
    font-weight: 700;
    line-height: 1.55;
    transition: opacity 220ms ease, transform 220ms ease;
}

.ppb-result-meta {
    max-width: 32rem;
    margin-inline: auto;
}

.ppb-result-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.ppb-result-phase,
.ppb-result-label,
.ppb-result-source,
.ppb-result-compliment,
.ppb-result-meta,
.ppb-result-wait,
.ppb-live-meta,
.pps-live-meta,
.ppt-live-meta,
.ppm-live-meta {
    display: none !important;
}

.ppb-result-wait {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(245, 249, 255, 0.78);
    font-size: 0.82rem;
    font-weight: 700;
}

.ppb-result-next-btn:disabled,
.ppb-result-fortune-btn:disabled {
    opacity: 0.52;
    cursor: not-allowed;
}

.ppb-result-panel.is-arming {
    transform: scale(0.985);
    border-color: rgba(110, 231, 255, 0.24);
}

.ppb-result-panel.is-arming .ppb-result-name,
.ppb-result-panel.is-arming .ppb-result-badge,
.ppb-result-panel.is-suspense .ppb-result-name,
.ppb-result-panel.is-suspense .ppb-result-badge {
    opacity: 0.22;
    filter: blur(8px);
    transform: scale(0.96);
}

.ppb-result-panel.is-suspense {
    animation: ppbResultSuspense 900ms ease-in-out infinite alternate;
}

.ppb-result-panel.is-suspense .ppb-result-wait {
    background: rgba(255, 212, 92, 0.12);
    color: #fff4bf;
}

.ppb-result-panel.is-celebrating {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 28px 88px rgba(2, 6, 23, 0.58),
        0 0 120px rgba(255, 212, 92, 0.16);
}

.ppb-result-panel.is-celebrating .ppb-result-name,
.ppb-result-panel.is-celebrating .ppb-result-badge,
.ppb-result-panel.is-celebrating .ppb-result-compliment {
    animation: ppbResultCelebrateIn 560ms cubic-bezier(.17,.84,.44,1) both;
    filter: none;
}

.ppb-result-panel.is-celebrating .ppb-result-compliment {
    display: block !important;
}

.ppb-result-panel.is-celebrating .ppb-result-name {
    text-shadow:
        0 0 34px rgba(255, 212, 92, 0.24),
        0 0 72px rgba(110, 231, 255, 0.14);
}

.ppb-result-panel.is-neutral {
    border-color: rgba(191, 219, 254, 0.24);
    box-shadow:
        0 0 0 1px rgba(191, 219, 254, 0.08),
        0 28px 88px rgba(2, 6, 23, 0.58),
        0 0 88px rgba(96, 165, 250, 0.1);
}

.ppb-result-panel.is-neutral .ppb-result-badge {
    color: #dbeafe;
    background: rgba(96, 165, 250, 0.18);
    border-color: rgba(191, 219, 254, 0.22);
}

.ppb-result-panel.is-neutral .ppb-result-compliment {
    color: #dbeafe;
}

.ppb-result-panel.is-finale {
    background:
        radial-gradient(circle at top, rgba(255, 212, 92, 0.34), transparent 32%),
        radial-gradient(circle at 80% 18%, rgba(110, 231, 255, 0.18), transparent 20%),
        linear-gradient(180deg, rgba(17, 38, 82, 0.99), rgba(7, 18, 44, 0.99));
}

.ppb-result-panel.is-finale .ppb-result-badge {
    background: linear-gradient(135deg, rgba(255, 212, 92, 0.36), rgba(255, 141, 115, 0.24));
}

.ppb-root.ppb-result-open .ppb-topbar,
.ppb-root.ppb-result-open .ppb-mode-view:not(.is-hidden) {
    filter: blur(24px) saturate(0.72);
    opacity: 0.1;
    pointer-events: none;
    user-select: none;
    transform: scale(0.985);
    transform-origin: center top;
    transition: filter 220ms ease, opacity 220ms ease, transform 220ms ease;
}

@media (min-width: 1280px) {
    .ppr-shell {
        grid-template-columns: minmax(0, 1.76fr) minmax(340px, 420px);
        gap: 1.15rem;
    }

    .ppr-main {
        padding: clamp(1.25rem, 1.75vw, 1.8rem);
    }

    .ppr-side-panel {
        padding: clamp(1rem, 1.35vw, 1.25rem);
        gap: 0.85rem;
    }

    .ppr-head {
        gap: 1.1rem;
        margin-top: 0.25rem;
    }

    .ppr-title {
        font-size: clamp(2rem, 2.6vw, 2.82rem);
        line-height: 1.04;
    }

    .ppr-guide {
        max-width: 40rem;
        font-size: 1.02rem;
        line-height: 1.58;
    }

    .ppr-classroom-badge {
        padding: 0.62rem 1rem;
        font-size: 0.9rem;
    }

    .ppr-card-grid {
        margin-top: 1rem;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.05rem;
    }

    .ppr-card-inner {
        min-height: clamp(18rem, 29vw, 21rem);
    }

    .ppr-card-face {
        border-radius: 1.28rem;
        padding: 1.24rem;
        gap: 1rem;
    }

    .ppr-card-head {
        gap: 1rem;
    }

    .ppr-card-icon {
        width: 3rem;
        height: 3rem;
        border-radius: 1rem;
        font-size: 1.38rem;
    }

    .ppr-card-slot {
        font-size: 0.84rem;
        line-height: 1.3;
        text-align: right;
    }

    .ppr-card-title {
        font-size: clamp(1.56rem, 1.18rem + 0.8vw, 2.2rem);
        line-height: 1.1;
        word-break: keep-all;
        overflow-wrap: normal;
    }

    .ppr-card-hint {
        font-size: 0.98rem;
        line-height: 1.58;
    }

    .ppr-card-number {
        font-size: 0.84rem;
    }

    .ppr-card-cta {
        font-size: 0.96rem;
        white-space: nowrap;
    }

    .ppr-card-back-label {
        font-size: 0.8rem;
    }

    .ppr-card-assignee {
        font-size: clamp(2.35rem, 3.9vw, 3.85rem);
        line-height: 1.02;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ppr-card-desc {
        font-size: 1rem;
        line-height: 1.58;
    }

    .ppr-card-status {
        font-size: 0.94rem;
    }

    .ppr-live-role-name {
        font-size: clamp(2rem, 2.3vw, 2.7rem);
        line-height: 1.08;
    }

    .ppr-live-assignee {
        font-size: 1.14rem;
        line-height: 1.62;
    }

    .ppb-result-panel {
        width: min(1180px, calc(100% - 2.4rem));
        max-width: none;
        min-height: min(80vh, 760px);
        padding: 2.75rem 2.7rem 2.45rem;
    }

    .ppb-result-badge {
        min-height: 2.6rem;
        margin-top: 1.1rem;
        padding: 0.48rem 1.1rem;
        font-size: 1rem;
    }

    .ppb-result-name {
        font-size: clamp(4.5rem, 7.2vw, 8rem);
        line-height: 0.96;
    }

    .ppb-result-compliment {
        max-width: 44rem;
        font-size: clamp(1.08rem, 1.5vw, 1.34rem);
    }

    .ppb-result-meta {
        max-width: 42rem;
        font-size: clamp(1.18rem, 1.7vw, 1.56rem);
    }
}

@media (min-width: 1600px) and (min-height: 850px) {
    .ppr-shell {
        grid-template-columns: minmax(0, 1.82fr) minmax(380px, 470px);
        gap: 1.35rem;
    }

    .ppr-main {
        padding: 1.6rem;
    }

    .ppr-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.2rem;
    }

    .ppr-card-inner {
        min-height: clamp(19.6rem, 26vw, 22.8rem);
    }

    .ppr-card-face {
        padding: 1.38rem;
    }

    .ppr-card-title {
        font-size: clamp(1.78rem, 1.28rem + 0.92vw, 2.46rem);
    }

    .ppr-card-assignee {
        font-size: clamp(2.8rem, 4.3vw, 4.35rem);
    }

    .ppb-result-panel {
        width: min(1320px, calc(100% - 3rem));
        min-height: min(82vh, 820px);
        padding: 3rem 2.95rem 2.7rem;
    }

    .ppb-result-name {
        font-size: clamp(5.2rem, 7.9vw, 8.8rem);
    }

    .pbl-stage-shell,
    .pps-stage-shell,
    .ppt-stage-shell,
    .ppm-stage-shell {
        grid-template-columns: minmax(0, 1.82fr) minmax(340px, 420px);
        gap: 1.2rem;
    }

    .pbl-stage-main,
    .pps-stage-main,
    .ppt-stage-main,
    .ppm-stage-main {
        padding: 1.35rem;
    }

    .pbl-live-card,
    .pps-live-card,
    .ppt-live-card,
    .ppm-live-card {
        min-height: 14rem;
    }

    .pbl-live-name,
    .pps-live-name,
    .ppt-live-name,
    .ppm-live-name {
        font-size: clamp(2.2rem, 2.8vw, 3.1rem);
    }

    .pbl-live-role,
    .pps-live-meta,
    .ppt-live-meta,
    .ppm-live-meta {
        font-size: 1.08rem;
    }

    .pbl-svg-wrap {
        min-height: clamp(580px, 68vh, 820px);
    }

    .pbl-svg {
        height: clamp(580px, 68vh, 820px);
    }

    .pps-order-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.1rem;
    }

    .pps-order-card {
        min-height: clamp(200px, 25vh, 238px);
        padding: 1.2rem;
    }

    .pps-order-name {
        font-size: clamp(1.72rem, 1.4rem + 0.85vw, 2.28rem);
    }

    .ppt-team-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.1rem;
    }

    .ppt-team-card {
        padding: 1.18rem;
    }

    .ppt-team-title {
        font-size: clamp(1.58rem, 1.28rem + 0.72vw, 2.02rem);
    }

    .ppt-member-chip {
        padding: 0.64rem 1.04rem;
        font-size: 1rem;
    }

    .ppm-stage-shell {
        grid-template-columns: minmax(0, 2.08fr) minmax(340px, 400px);
    }

    .ppm-sky {
        min-height: clamp(620px, 74vh, 920px);
    }

    .ppm-empty {
        min-height: clamp(470px, 60vh, 740px);
    }

    .ppm-meteor {
        width: 210px;
        height: 64px;
    }

    .ppm-meteor-core {
        width: 32px;
        height: 32px;
    }

    .ppm-meteor-tail {
        width: 160px;
        height: 6px;
    }

    .ppm-meteor-hint {
        font-size: 0.86rem;
    }
}

.ppb-is-fullscreen .ppb-host-console {
    padding: 0.75rem;
    gap: 0.6rem;
}

.ppb-is-fullscreen .ppb-host-guide,
.ppb-is-fullscreen .ppb-stage-trust span,
.ppb-is-fullscreen .ppb-mode-tab-copy small {
    display: none;
}

.ppb-is-fullscreen .ppb-mode-tab {
    min-height: 4.65rem;
    padding: 0.72rem 0.8rem;
}

.ppb-is-fullscreen .ppb-topbar {
    gap: 0.75rem;
}

.ppb-is-fullscreen .ppb-top-main {
    align-items: center;
}

@keyframes ppbResultSuspense {
    from {
        transform: scale(0.985);
        box-shadow: 0 18px 58px rgba(2, 6, 23, 0.5);
    }
    to {
        transform: scale(1.008);
        box-shadow: 0 24px 76px rgba(255, 212, 92, 0.14);
    }
}

@keyframes ppbResultCelebrateIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1180px) {
    .ppb-host-shell {
        grid-template-columns: 1fr;
    }

    .ppb-stage-trust {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 860px) {
    .ppb-result-panel {
        padding-inline: 1.1rem;
    }

    .ppb-result-actions {
        flex-direction: column;
    }

    .ppb-result-next-btn,
    .ppb-result-fortune-btn {
        width: 100%;
    }
}

/* Simplified classroom-first layout */
.ppb-topbar {
    gap: 0.75rem;
    padding: 0.95rem 1rem 1rem;
}

.ppb-command-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ppb-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ppb-brand-copy h1 {
    margin: 0;
    font-family: var(--ppb-display-font);
    font-size: clamp(1.55rem, 2.6vw, 2rem);
    letter-spacing: 0.01em;
}

.ppb-brand-copy p:last-child {
    margin: 0;
    color: rgba(245, 249, 255, 0.78);
    line-height: 1.5;
}

.ppb-top-controls {
    gap: 0.6rem;
}

.ppb-mode-summary {
    display: block;
    padding: 0.8rem 0.95rem;
    border-radius: 1rem;
    background: rgba(8, 23, 56, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ppb-mode-summary-copy {
    min-width: 0;
}

.ppb-stage-desc {
    display: none;
}

.ppb-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.ppb-mode-tab {
    min-height: auto;
    padding: 0.58rem 0.8rem;
    justify-content: center;
    gap: 0.42rem;
    border-radius: 999px;
}

.ppb-mode-tab-copy {
    gap: 0;
}

.ppb-mode-tab-copy strong {
    font-size: 0.88rem;
}

.ppb-mode-tab-copy small {
    display: none;
}

.ppb-mode-tab-icon {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    font-size: 1rem;
}

.ppb-screen {
    align-items: flex-start;
}

.ppb-start-shell {
    width: min(1100px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1rem;
    align-items: stretch;
}

.ppb-start-card {
    padding: 1rem;
}

.ppb-start-card h2 {
    margin: 0;
    font-family: var(--ppb-display-font);
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    letter-spacing: 0.01em;
}

.ppb-start-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.ppb-start-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
}

.ppb-start-label {
    display: block;
    margin: 0.8rem 0 0.45rem;
    font-size: 0.94rem;
    font-weight: 800;
}

.ppb-start-card-main .ppb-textarea {
    min-height: 400px;
}

.ppb-start-card-side {
    display: flex;
    flex-direction: column;
}

.ppb-start-card-side .ppb-stats-grid {
    margin-top: 0.75rem;
}

.ppb-start-card-side .ppb-primary-btn {
    margin-top: auto;
}

.ppb-stage-layout {
    width: min(1420px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 0.72rem;
    align-items: start;
}

.ppb-universe-main {
    padding: 1.05rem;
}

.ppb-universe-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
    gap: 1rem;
    align-items: end;
}

.ppb-universe-status {
    min-width: 0;
}

.ppb-universe-title {
    margin-top: 0.6rem;
    text-align: left;
    letter-spacing: 0.01em;
    font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.ppb-picked-card {
    width: 100%;
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.ppb-orb-grid {
    margin-top: 1rem;
    min-height: clamp(430px, 60vh, 720px);
}

.ppb-bottom-actions {
    margin-top: 1rem;
    justify-content: flex-start;
}

.ppb-bottom-actions > * {
    flex: 0 1 188px;
}

.ppb-control-panel {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.78rem;
    border-radius: 1rem;
    background: var(--ppb-stage-panel);
    border: 1px solid var(--ppb-stage-border);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
}

.ppb-live-card {
    min-height: 0;
}

.ppb-live-name {
    font-size: clamp(1.68rem, 2.35vw, 2.25rem);
    line-height: 1.04;
}

.ppb-live-meta {
    font-size: 0.84rem;
}

.ppb-side-actions .ppb-soft-btn {
    width: 100%;
}

.ppb-side-disclosure {
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.ppb-side-disclosure summary {
    padding: 0.72rem 0.85rem;
    font-size: 0.9rem;
}

.ppb-stage-more {
    position: relative;
    flex: 0 0 auto;
    min-width: 0;
}

.ppb-stage-more > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    cursor: pointer;
}

.ppb-stage-more > summary::-webkit-details-marker {
    display: none;
}

.ppb-stage-more-toggle {
    min-width: 7rem;
}

.ppb-stage-more[open] .ppb-stage-more-toggle {
    background: rgba(255, 212, 92, 0.12);
    border-color: rgba(255, 212, 92, 0.22);
}

.ppb-stage-more-menu {
    display: none;
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.45rem);
    width: min(230px, 72vw);
    padding: 0.45rem;
    border-radius: 0.9rem;
    background: rgba(8, 22, 52, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
    z-index: 20;
}

.ppb-stage-more[open] .ppb-stage-more-menu {
    display: grid;
    gap: 0.42rem;
}

.ppb-stage-more-menu .ppb-soft-btn,
.ppb-stage-more-menu .ppb-ghost-btn {
    width: 100%;
    display: flex;
    justify-content: center;
}

.ppb-is-fullscreen .ppb-topbar {
    gap: 0.7rem;
    padding: 0.75rem;
}

.ppb-is-fullscreen .ppb-brand-copy p:last-child {
    display: none;
}

.ppb-is-fullscreen .ppb-mode-summary {
    padding: 0.65rem 0.85rem;
}

.ppb-is-fullscreen .ppb-mode-tab {
    padding: 0.48rem 0.72rem;
}

@media (max-width: 860px) {
    .ppb-result-panel {
        max-width: min(540px, calc(100vw - 2rem));
        padding: 1.45rem 1.25rem 1.25rem;
    }

    .ppb-result-source,
    .ppb-result-badge,
    .ppb-result-compliment {
        display: none;
    }

    .ppb-result-name {
        margin-top: 0.35rem;
    }

    .ppb-result-meta {
        margin-top: 0.4rem;
    }
}

@media (max-width: 1180px) {
    .ppb-command-bar,
    .ppb-mode-summary,
    .ppb-start-shell,
    .ppb-stage-layout,
    .ppb-universe-head {
        grid-template-columns: 1fr;
    }

    .ppb-command-bar {
        flex-direction: column;
    }

    .ppb-top-controls {
        justify-content: flex-start;
    }

    .ppb-control-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    .ppb-topbar,
    .ppb-start-card,
    .ppb-control-panel {
        padding: 0.9rem;
    }

    .ppb-top-controls {
        width: 100%;
    }

    .ppb-top-controls > * {
        flex: 1 1 160px;
    }

    .ppb-mode-tab {
        flex: 1 1 calc(50% - 0.55rem);
    }

    .ppb-start-head {
        grid-template-columns: 1fr;
    }

    .ppb-start-tools {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ppb-start-card-main .ppb-textarea {
        min-height: 320px;
    }

    .ppb-picked-card {
        min-height: 0;
    }

    .ppb-bottom-actions > * {
        flex-basis: 100%;
    }
}

/* First-screen density tune for draw modes */
.ppb-root {
    padding: clamp(0.45rem, 1vw, 0.75rem);
}

.ppb-topbar {
    gap: 0.42rem;
    padding: 0.56rem 0.7rem 0.62rem;
}

.ppb-command-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.ppb-toolbar-main {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.52rem;
}

.ppb-brand {
    align-items: center;
    gap: 0.45rem;
}

.ppb-brand-icon {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.95rem;
}

.ppb-brand-icon svg {
    width: 1.08rem;
    height: 1.08rem;
}

.ppb-brand-copy {
    gap: 0;
}

.ppb-brand-copy h1 {
    font-size: clamp(1rem, 1.55vw, 1.18rem);
    line-height: 1.04;
}

.ppb-toolbar-mode {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    padding: 0.26rem 0.56rem;
    border-radius: 999px;
    background: rgba(8, 23, 56, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ppb-toolbar-mode-kicker {
    color: #fff4bf;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.ppb-toolbar-mode-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--ppb-display-font);
    font-size: clamp(0.86rem, 1.15vw, 0.98rem);
    line-height: 1.1;
    color: #f9fbff;
}

.ppb-top-controls {
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;
}

.ppb-mode-tabs::-webkit-scrollbar {
    display: none;
}

.ppb-tools-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    list-style: none;
    cursor: pointer;
}

.ppb-tools-toggle::-webkit-details-marker {
    display: none;
}

.ppb-tools-toggle::marker {
    display: none;
}

.ppb-tools-panel {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 40;
    width: min(240px, calc(100vw - 1rem));
    display: none;
    padding: 0.42rem;
    border-radius: 0.9rem;
    background: rgba(7, 19, 46, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.ppb-top-controls[open] .ppb-tools-toggle {
    background: rgba(255, 212, 92, 0.16);
    border-color: rgba(255, 212, 92, 0.26);
}

.ppb-top-controls[open] .ppb-tools-panel {
    display: grid;
    gap: 0.34rem;
}

.ppb-tools-panel .ppb-ghost-btn,
.ppb-tools-panel .ppb-audio-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.ppb-tools-panel .ppb-toggle {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    min-height: 1.95rem;
    padding: 0.42rem 0.58rem;
    border-radius: 0.72rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.88);
}

.ppb-tools-panel .ppb-toggle input {
    margin: 0;
}

.ppb-topbar .ppb-ghost-btn,
.ppb-topbar .ppb-audio-btn {
    padding: 0.42rem 0.58rem;
    border-radius: 0.72rem;
    font-size: 0.78rem;
}

.ppb-topbar .ppb-toggle {
    min-height: 1.95rem;
    padding-inline: 0.15rem;
    font-size: 0.76rem;
}

.ppb-mode-tabs {
    gap: 0.3rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.08rem;
    scrollbar-width: none;
}

.ppb-mode-tab {
    flex: 0 0 auto;
    min-height: auto;
    padding: 0.34rem 0.54rem;
    gap: 0.26rem;
}

.ppb-mode-tab-copy strong {
    font-size: 0.79rem;
}

.ppb-mode-tab-icon {
    width: 1.42rem;
    height: 1.42rem;
    font-size: 0.8rem;
}

.ppb-screen {
    padding-top: 0.28rem;
    padding-bottom: 0.75rem;
}

.ppb-stage-layout {
    width: min(1480px, 100%);
    gap: 0.72rem;
}

.ppb-universe-main {
    padding: 0.66rem;
}

.ppb-universe-status {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.45rem 0.8rem;
}

.ppb-universe-meta {
    min-width: 0;
    display: grid;
    gap: 0.34rem;
}

.ppb-universe-title {
    margin: 0;
    text-align: right;
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    letter-spacing: 0.03em;
}

.ppb-progress-wrap {
    margin-top: 0;
}

.ppb-progress-track {
    margin-top: 0.22rem;
}

.ppb-orb-grid {
    margin-top: 0;
    min-height: clamp(410px, 58vh, 700px);
}

.ppb-control-panel {
    gap: 0.45rem;
    padding: 0.66rem;
}

.ppb-universe-status-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 0.58rem 0.64rem;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, rgba(11, 25, 58, 0.86), rgba(7, 19, 45, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ppb-universe-status-card .ppb-universe-meta {
    gap: 0.28rem;
}

.ppb-universe-status-card .ppb-chip-row {
    gap: 0.3rem;
}

.ppb-universe-status-card .ppb-chip {
    padding: 0.28rem 0.54rem;
    font-size: 0.76rem;
}

.ppb-universe-status-card .ppb-universe-title {
    display: none;
}

.ppb-universe-status-card .ppb-progress-label {
    font-size: 0.76rem;
}

.ppb-universe-status-card .ppb-progress-track {
    height: 0.45rem;
}

.ppb-picked-card {
    width: 100%;
    margin: 0;
    padding: 0.58rem 0.68rem;
    text-align: left;
}

.ppb-picked-name {
    font-size: clamp(1.62rem, 2.45vw, 2.35rem);
    line-height: 1.04;
}

.ppb-live-card {
    min-height: 0;
}

.ppb-panel-info {
    padding: 0.95rem;
}

.ppb-panel-info h2 {
    margin-bottom: 0;
    font-size: clamp(1rem, 1.4vw, 1.18rem);
}

.ppb-panel-info .ppb-muted,
.pbl-stage-guide,
.pps-stage-guide,
.ppt-stage-guide,
.ppm-stage-guide,
.ppr-guide {
    display: none;
}

.ppb-message:empty {
    display: none;
}

.ppm-meteor-hint,
.ppr-card-hint,
.ppr-card-cta,
.ppr-card-desc {
    display: none !important;
}

.ppb-side-actions {
    display: grid;
    gap: 0.55rem;
}

.ppb-side-disclosure {
    margin-top: 0;
}

.pbl-stage-main > .ppb-chip-row,
.pps-stage-main > .ppb-chip-row,
.ppt-stage-main > .ppb-chip-row,
.ppm-stage-main > .ppb-chip-row,
.ppr-main > .ppb-chip-row {
    margin-bottom: 0.55rem;
}

.pbl-stage-title,
.pps-stage-title,
.ppt-stage-title,
.ppm-stage-title,
.ppr-title {
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    line-height: 1.08;
}

.pbl-stage-guide,
.pps-stage-guide,
.ppt-stage-guide,
.ppm-stage-guide,
.ppr-guide {
    margin-top: 0.25rem;
    font-size: 0.89rem;
    line-height: 1.5;
}

.pbl-stage-shell,
.pps-stage-shell,
.ppt-stage-shell,
.ppm-stage-shell,
.ppr-shell {
    grid-template-columns: minmax(0, 2.08fr) minmax(228px, 280px);
}

.pbl-stage-main,
.pps-stage-main,
.ppt-stage-main,
.ppm-stage-main,
.ppr-main {
    padding: clamp(0.95rem, 0.95vw + 0.45rem, 1.18rem);
}

.pbl-live-card,
.pps-live-card,
.ppt-live-card,
.ppm-live-card,
.ppr-live-card {
    min-height: clamp(7.8rem, 14vh, 9rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.pbl-live-name,
.pps-live-name,
.ppt-live-name,
.ppm-live-name {
    font-size: clamp(1.8rem, 2.8vw, 2.65rem);
    line-height: 1.05;
    word-break: keep-all;
}

.pbl-live-role,
.pps-live-index,
.ppt-live-team,
.ppm-live-order,
.ppr-live-role-name {
    margin: 0;
    font-size: clamp(0.84rem, 1vw, 0.98rem);
    line-height: 1.2;
    font-weight: 800;
    color: rgba(255, 238, 176, 0.92);
}

.ppr-live-role-name {
    letter-spacing: 0.02em;
}

.ppr-live-assignee {
    margin: 0.12rem 0 0;
    font-size: clamp(1.95rem, 2.9vw, 2.9rem);
    line-height: 1.04;
    font-weight: 900;
    color: #f8fafc;
}

.pbl-svg-wrap {
    min-height: clamp(308px, 39vh, 360px);
}

.pbl-svg {
    height: clamp(308px, 39vh, 360px);
}

.pbl-node-name,
.pbl-bottom-node {
    font-size: clamp(0.74rem, 0.78vw, 0.9rem);
}

.pps-order-grid {
    grid-template-columns: repeat(auto-fit, minmax(102px, 1fr));
    gap: 0.58rem;
}

.pps-order-card {
    min-height: clamp(74px, 10.5vh, 92px);
    padding: 0.58rem;
}

.pps-order-name {
    font-size: clamp(0.92rem, 1.08vw, 1.16rem);
    line-height: 1.08;
}

.ppt-team-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1rem;
}

.ppt-team-card {
    padding: 1.08rem;
    gap: 0.95rem;
}

.ppt-team-title {
    font-size: clamp(1.42rem, 1.8vw, 1.9rem);
    line-height: 1.12;
}

.ppt-team-size {
    font-size: 0.92rem;
}

.ppt-member-chip {
    padding: 0.58rem 0.96rem;
    font-size: clamp(0.95rem, 1vw, 1.05rem);
}

.ppm-stage-shell {
    grid-template-columns: minmax(0, 2.32fr) minmax(228px, 276px);
}

.ppm-sky {
    min-height: clamp(360px, 45vh, 430px);
    margin-top: 0.68rem;
}

.ppm-sky::before {
    opacity: 0.7;
}

.ppm-sky::after {
    background: radial-gradient(circle at center, rgba(251, 191, 36, 0.34), transparent 48%);
}

.ppm-empty {
    min-height: clamp(260px, 34vh, 320px);
}

.ppm-meteor {
    width: 144px;
    height: 44px;
    filter: drop-shadow(0 0 16px rgba(125, 211, 252, 0.26));
}

.ppm-meteor:hover,
.ppm-meteor:focus-visible {
    filter: drop-shadow(0 0 24px rgba(125, 211, 252, 0.46));
}

.ppm-meteor-core {
    right: 14px;
    width: 22px;
    height: 22px;
    box-shadow: 0 0 26px rgba(125, 211, 252, 0.92), 0 0 52px rgba(56, 189, 248, 0.42);
}

.ppm-meteor-tail {
    left: 12px;
    width: 106px;
    height: 5px;
    box-shadow: 0 0 24px rgba(125, 211, 252, 0.38);
}

.ppm-meteor-hint {
    left: 10px;
    bottom: -4px;
    font-size: 0.72rem;
}

@media (max-width: 1180px) {
    .ppb-command-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .ppb-toolbar-main {
        width: 100%;
    }

    .ppb-universe-status {
        grid-template-columns: 1fr;
    }

    .ppb-universe-title {
        text-align: left;
    }
}

@media (max-width: 860px) {
    .ppb-topbar {
        padding: 0.55rem;
    }

    .ppb-toolbar-main {
        align-items: flex-start;
    }

    .ppb-toolbar-mode {
        width: 100%;
    }

    .ppb-top-controls {
        width: auto;
        align-self: flex-end;
    }

    .ppb-mode-tab {
        flex: 0 0 auto;
        justify-content: flex-start;
    }

    .ppb-start-shell,
    .ppb-stage-layout {
        gap: 0.75rem;
    }

    .ppb-universe-main,
    .ppb-control-panel {
        padding: 0.85rem;
    }

    .ppb-orb-grid {
        min-height: clamp(320px, 52vh, 520px);
    }

    .pbl-stage-shell,
    .pps-stage-shell,
    .ppt-stage-shell,
    .ppm-stage-shell,
    .ppr-shell {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0.7rem;
    }

    .pbl-stage-main,
    .pps-stage-main,
    .ppt-stage-main,
    .ppm-stage-main,
    .ppr-main {
        order: 1;
        padding: 0.88rem;
    }

    .pbl-side-panel,
    .pps-side-panel,
    .ppt-side-panel,
    .ppm-side-panel,
    .ppr-side-panel {
        order: 2;
        position: static;
        padding: 0.82rem;
    }

    .pbl-live-card,
    .pps-live-card,
    .ppt-live-card,
    .ppm-live-card,
    .ppr-live-card {
        min-height: 0;
    }

    .pbl-svg-wrap,
    .pbl-svg {
        min-height: clamp(360px, 48vh, 520px);
        height: clamp(360px, 48vh, 520px);
    }

    .pps-order-grid,
    .ppt-team-grid,
    .ppr-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ppm-sky,
    .ppm-empty {
        min-height: clamp(360px, 48vh, 520px);
    }

    .ppm-meteor {
        width: 148px;
        height: 50px;
    }

    .ppm-meteor-core {
        width: 24px;
        height: 24px;
    }

    .ppm-meteor-tail {
        width: 104px;
    }

    .ppb-stage-more {
        width: 100%;
        flex-basis: 100%;
    }

    .ppb-stage-more-menu {
        position: static;
        width: 100%;
        margin-top: 0.42rem;
    }
}

.ppt-member-empty {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.82rem;
    line-height: 1.2;
    font-weight: 700;
}

.ppr-empty {
    padding: 0.95rem 1rem;
    border-radius: 0.95rem;
    text-align: left;
    line-height: 1.4;
}

.ppb-stage-topbar {
    position: sticky;
    top: clamp(0.55rem, 2vw, 1rem);
    z-index: 18;
    display: grid;
    gap: 0.72rem;
    margin-bottom: 0.9rem;
    padding: 0.82rem 0.92rem;
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(9, 23, 54, 0.94), rgba(6, 17, 42, 0.9)),
        radial-gradient(circle at top right, rgba(110, 231, 255, 0.14), transparent 34%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 42px rgba(2, 6, 23, 0.28);
    backdrop-filter: blur(16px);
}

.ppb-stage-topbar .ppb-chip-row {
    gap: 0.42rem;
}

.ppb-stage-top-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.ppb-stage-top-actions .ppb-primary-btn,
.ppb-stage-top-actions .ppb-soft-btn,
.ppb-stage-top-actions .ppb-ghost-btn {
    width: auto;
    min-width: 132px;
    margin-top: 0;
}

.ppb-stage-layout,
.pbl-stage-shell,
.pps-stage-shell,
.ppt-stage-shell,
.ppm-stage-shell,
.ppr-shell {
    align-items: start;
}

.ppb-control-panel,
.pbl-side-panel,
.pps-side-panel,
.ppt-side-panel,
.ppm-side-panel,
.ppr-side-panel {
    position: sticky;
    top: calc(clamp(0.55rem, 2vw, 1rem) + 5.8rem);
}

.ppb-stage-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 0.8rem;
    margin-bottom: 0.9rem;
}

.ppb-stage-live-card {
    min-height: 0;
}

.ppb-stage-result,
.pbl-stage-result,
.pps-stage-result,
.ppt-stage-result,
.ppm-stage-result,
.ppr-stage-result {
    position: relative;
    overflow: hidden;
}

.ppb-stage-result::before,
.pbl-stage-result::before,
.pps-stage-result::before,
.ppt-stage-result::before,
.ppm-stage-result::before,
.ppr-stage-result::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 212, 92, 0), rgba(255, 212, 92, 0.9), rgba(110, 231, 255, 0));
    opacity: 0.72;
}

.pbl-top-node.is-current {
    border-color: rgba(250, 204, 21, 0.9);
    background: linear-gradient(180deg, rgba(120, 53, 15, 0.9), rgba(92, 33, 4, 0.76));
    color: #fef3c7;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.22), 0 18px 34px rgba(92, 33, 4, 0.32);
    transform: translateY(-2px);
}

.pbl-bottom-node.is-current {
    border-color: rgba(250, 204, 21, 0.88);
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.22), 0 16px 32px rgba(250, 204, 21, 0.18);
    transform: translateY(-1px);
}

.pbl-live-card {
    padding: 0.96rem 1rem;
}

.pbl-live-card.is-winner {
    border-color: rgba(250, 204, 21, 0.7);
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.18), 0 20px 44px rgba(250, 204, 21, 0.12);
}

.pbl-live-card.is-role-mode .pbl-live-role {
    order: -1;
    font-size: clamp(1.16rem, 1.7vw, 1.52rem);
    color: #fde68a;
}

.pbl-live-card.is-role-mode .pbl-live-name {
    font-size: clamp(1.65rem, 2.4vw, 2.25rem);
}

.pps-stage-result {
    display: grid;
    justify-items: start;
    gap: 0.35rem;
    padding: 1.12rem 1.2rem;
}

.pps-live-label,
.ppt-live-label,
.ppm-live-label,
.ppr-live-label {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.pps-live-index,
.ppm-live-order,
.ppr-live-slot {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.36rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 212, 92, 0.14);
    border: 1px solid rgba(255, 212, 92, 0.26);
    color: rgba(255, 238, 176, 0.96);
}

.pps-live-name {
    font-size: clamp(2.15rem, 3.5vw, 3.05rem);
    line-height: 1.02;
}

.pps-fortune-btn,
.ppt-fortune-btn,
.ppm-fortune-btn,
.ppr-fortune-btn {
    width: 100%;
    max-width: 280px;
    margin-top: 0.32rem;
}

.ppt-stage-result {
    display: grid;
    justify-items: start;
    gap: 0.32rem;
    padding: 1.12rem 1.2rem;
    border-color: rgba(96, 165, 250, 0.28);
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(9, 23, 54, 0.96), rgba(4, 16, 40, 0.92));
}

.ppt-live-team {
    margin: 0;
    font-size: clamp(2.05rem, 3.2vw, 2.95rem);
    line-height: 1.02;
    font-weight: 900;
    color: #fde68a;
}

.ppt-live-name {
    margin: 0;
    font-size: clamp(1.35rem, 2.1vw, 1.85rem);
    line-height: 1.08;
}

.ppt-team-card.is-current {
    border-color: rgba(250, 204, 21, 0.68);
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.22), transparent 38%),
        linear-gradient(180deg, rgba(53, 24, 8, 0.92), rgba(15, 23, 42, 0.86));
    box-shadow: 0 22px 40px rgba(92, 33, 4, 0.28);
    transform: translateY(-2px);
}

.ppt-team-card.is-current .ppt-team-title,
.ppt-team-card.is-current .ppt-team-size {
    color: #fef3c7;
}

.ppt-team-card.is-recent:not(.is-current) {
    border-color: rgba(96, 165, 250, 0.45);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.26);
}

.ppt-team-spotlight {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.62rem;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.16);
    border: 1px solid rgba(250, 204, 21, 0.32);
    color: #fde68a;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.ppt-team-spotlight.is-recent {
    background: rgba(96, 165, 250, 0.14);
    border-color: rgba(96, 165, 250, 0.3);
    color: #dbeafe;
}

.ppm-stage-result {
    display: grid;
    justify-items: start;
    gap: 0.36rem;
    padding: 1.12rem 1.2rem;
}

.ppm-live-name {
    font-size: clamp(2.3rem, 3.8vw, 3.25rem);
    line-height: 1.02;
}

.ppm-impact-meteor {
    position: absolute;
    left: var(--ppm-impact-start-x, 110%);
    top: var(--ppm-impact-start-y, -18%);
    width: 240px;
    height: 88px;
    pointer-events: none;
    z-index: 4;
    transform: translate(-50%, -50%) rotate(-28deg) scale(0.92);
    filter: drop-shadow(0 0 18px rgba(125, 211, 252, 0.34));
    transition:
        left 1050ms cubic-bezier(0.2, 0.8, 0.2, 1),
        top 1050ms cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 1050ms cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 1050ms ease;
}

.ppm-impact-meteor.is-falling {
    left: var(--ppm-impact-end-x, 52%);
    top: var(--ppm-impact-end-y, 60%);
    transform: translate(-50%, -50%) rotate(-40deg) scale(1.08);
    filter: drop-shadow(0 0 30px rgba(125, 211, 252, 0.54));
}

.ppm-impact-meteor.is-impact {
    transform: translate(-50%, -50%) rotate(-12deg) scale(1.16);
}

.ppm-impact-core,
.ppm-impact-tail,
.ppm-impact-name {
    position: absolute;
}

.ppm-impact-core {
    top: 50%;
    right: 18px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: radial-gradient(circle at 28% 30%, #fff, #fef08a 34%, #38bdf8 74%, rgba(56, 189, 248, 0.16) 100%);
    box-shadow: 0 0 26px rgba(125, 211, 252, 0.88), 0 0 58px rgba(56, 189, 248, 0.42);
}

.ppm-impact-tail {
    top: 50%;
    left: 18px;
    width: 170px;
    height: 8px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(125, 211, 252, 0), rgba(125, 211, 252, 0.34) 26%, rgba(253, 224, 71, 0.96) 100%);
    box-shadow: 0 0 26px rgba(125, 211, 252, 0.4);
}

.ppm-impact-name {
    left: 50%;
    top: calc(100% + 0.35rem);
    transform: translate(-50%, 6px);
    padding: 0.38rem 0.78rem;
    border-radius: 999px;
    background: rgba(8, 20, 48, 0.92);
    border: 1px solid rgba(255, 212, 92, 0.34);
    color: #fef3c7;
    font-size: 0.94rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    opacity: 0;
    transition: opacity 160ms ease, transform 160ms ease;
    white-space: nowrap;
}

.ppm-impact-meteor.is-impact .ppm-impact-name {
    opacity: 1;
    transform: translate(-50%, 0);
}

.ppr-stage-result {
    display: grid;
    justify-items: start;
    gap: 0.34rem;
    padding: 1.12rem 1.2rem;
    border-color: rgba(250, 204, 21, 0.28);
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(19, 35, 74, 0.96), rgba(7, 16, 40, 0.92));
}

.ppr-live-role-name {
    margin: 0;
    font-size: clamp(2.15rem, 3.5vw, 3.05rem) !important;
    line-height: 1.02;
    color: #fde68a !important;
}

.ppr-live-assignee {
    margin: 0;
    font-size: clamp(1.48rem, 2.3vw, 2.08rem);
    line-height: 1.08;
}

.ppr-card.is-current .ppr-card-front,
.ppr-card.is-current .ppr-card-back {
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.22), 0 24px 44px rgba(250, 204, 21, 0.12);
}

.ppr-card.is-current .ppr-card-front {
    border-color: rgba(250, 204, 21, 0.58);
}

.ppr-card.is-current .ppr-card-back {
    border-color: rgba(250, 204, 21, 0.7);
}

.ppr-card.is-revealed .ppr-card-back-label {
    font-size: 1.02rem;
    color: #fff4bf;
}

.ppr-card-status {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 0.34rem 0.66rem;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.24);
}

@media (max-width: 860px) {
    .ppb-stage-topbar,
    .ppb-control-panel,
    .pbl-side-panel,
    .pps-side-panel,
    .ppt-side-panel,
    .ppm-side-panel,
    .ppr-side-panel {
        position: static;
        top: auto;
    }

    .ppb-stage-top-actions {
        justify-content: stretch;
    }

    .ppb-stage-top-actions .ppb-primary-btn,
    .ppb-stage-top-actions .ppb-soft-btn,
    .ppb-stage-top-actions .ppb-ghost-btn {
        flex: 1 1 calc(50% - 0.3rem);
        min-width: 0;
    }

    .ppb-stage-spotlight {
        grid-template-columns: 1fr;
    }

    .ppm-impact-meteor {
        width: 176px;
        height: 68px;
    }

    .ppm-impact-tail {
        width: 122px;
    }
}

/* Stars mode completion pass: teacher setup, student stage, and presentation scale */
.ppb-ui-icon {
    width: 1.12em;
    height: 1.12em;
    flex: 0 0 auto;
}

.ppb-start-shell {
    width: min(1320px, 100%);
    grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.72fr);
    gap: clamp(0.85rem, 1.4vw, 1.15rem);
}

.ppb-start-card {
    border-radius: 1.05rem;
}

.ppb-start-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.95rem;
    padding: 0.82rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 0.9rem;
    background:
        linear-gradient(135deg, rgba(255, 212, 92, 0.14), rgba(110, 231, 255, 0.1)),
        rgba(255, 255, 255, 0.04);
}

.ppb-start-kicker,
.ppb-student-display-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: #fff4bf;
    font-size: 0.8rem;
    font-weight: 900;
}

.ppb-start-flow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(245, 249, 255, 0.82);
}

.ppb-start-flow span {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.76rem;
    font-weight: 900;
    white-space: nowrap;
}

.ppb-start-flow span:nth-child(2) {
    color: #031326;
    background: #ffd45c;
}

.ppb-start-card-main .ppb-textarea {
    min-height: clamp(420px, 54vh, 620px);
    padding: 1rem;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.97);
    color: #0f172a;
    font-size: 1.05rem;
    line-height: 1.65;
}

.ppb-start-preview {
    margin-top: 0.75rem;
}

.ppb-start-card-side {
    align-self: start;
}

.ppb-start-card-side .ppb-primary-btn {
    margin-top: 0.85rem;
}

.ppb-start-preview-board {
    position: relative;
    min-height: 11rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.95rem;
    background:
        radial-gradient(circle at 22% 22%, rgba(255, 212, 92, 0.28), transparent 26%),
        radial-gradient(circle at 84% 22%, rgba(110, 231, 255, 0.2), transparent 28%),
        linear-gradient(145deg, rgba(4, 18, 46, 0.98), rgba(9, 31, 72, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ppb-start-preview-board strong,
.ppb-start-preview-board small {
    position: relative;
    z-index: 1;
    text-align: center;
}

.ppb-start-preview-board strong {
    color: #fff4bf;
    font-family: var(--ppb-display-font);
    font-size: clamp(2.2rem, 3.5vw, 3.6rem);
    line-height: 0.95;
    text-shadow: 0 12px 32px rgba(255, 212, 92, 0.28);
}

.ppb-start-preview-board small {
    margin-top: -2.2rem;
    color: rgba(245, 249, 255, 0.74);
    font-size: 0.82rem;
    font-weight: 800;
}

.ppb-start-preview-star {
    position: absolute;
    color: #fff4bf;
    font-size: 1.55rem;
    filter: drop-shadow(0 0 14px rgba(255, 212, 92, 0.54));
    animation: ppbPreviewFloat 2.8s ease-in-out infinite;
}

.ppb-start-preview-star-a {
    left: 18%;
    top: 24%;
}

.ppb-start-preview-star-b {
    right: 16%;
    top: 28%;
    color: #c9f6ff;
    animation-delay: 0.5s;
}

.ppb-start-preview-star-c {
    left: 26%;
    bottom: 18%;
    color: #ffcfbd;
    animation-delay: 1s;
}

.ppb-stage-layout {
    width: min(1600px, 100%);
    grid-template-columns: minmax(0, 1fr) minmax(252px, 304px);
}

.ppb-universe-main {
    padding: clamp(0.72rem, 1.1vw, 1rem);
}

.ppb-student-display-card {
    position: relative;
    min-height: clamp(9.5rem, 18vh, 13.25rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
    padding: clamp(1rem, 1.8vw, 1.35rem);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    background:
        radial-gradient(circle at 84% 20%, rgba(255, 212, 92, 0.2), transparent 28%),
        linear-gradient(135deg, rgba(5, 18, 46, 0.98), rgba(12, 36, 82, 0.93));
    box-shadow: 0 22px 54px rgba(2, 6, 23, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ppb-student-display-card h2 {
    position: relative;
    z-index: 1;
    max-width: 12ch;
    margin: 0.3rem 0 0;
    color: #ffffff;
    font-family: var(--ppb-display-font);
    font-size: clamp(2.85rem, 6.3vw, 5.9rem);
    font-weight: 900;
    line-height: 0.95;
    word-break: keep-all;
    overflow-wrap: anywhere;
    text-shadow: 0 16px 42px rgba(110, 231, 255, 0.22);
}

.ppb-student-display-card p {
    position: relative;
    z-index: 1;
    margin: 0.38rem 0 0;
    color: rgba(245, 249, 255, 0.76);
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    font-weight: 800;
}

.ppb-student-display-orbit {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ppb-student-display-orbit span {
    position: absolute;
    color: rgba(255, 244, 191, 0.92);
    font-size: clamp(1.25rem, 2.5vw, 2.2rem);
    filter: drop-shadow(0 0 18px rgba(255, 212, 92, 0.36));
    animation: ppbPreviewFloat 3.2s ease-in-out infinite;
}

.ppb-student-display-orbit span::before {
    content: "✦";
}

.ppb-student-display-orbit span:nth-child(1) {
    right: 12%;
    top: 16%;
}

.ppb-student-display-orbit span:nth-child(2) {
    right: 23%;
    bottom: 18%;
    color: rgba(201, 246, 255, 0.9);
    animation-delay: 0.7s;
}

.ppb-student-display-orbit span:nth-child(3) {
    right: 6%;
    bottom: 28%;
    color: rgba(255, 207, 189, 0.9);
    animation-delay: 1.1s;
}

.ppb-root.ppb-has-stage-winner .ppb-student-display-card {
    border-color: rgba(255, 212, 92, 0.34);
    box-shadow: 0 26px 70px rgba(255, 212, 92, 0.14), 0 22px 54px rgba(2, 6, 23, 0.3);
}

.ppb-root.ppb-has-stage-winner .ppb-student-display-card h2 {
    color: #fff4bf;
    text-shadow: 0 18px 46px rgba(255, 212, 92, 0.28);
}

.ppb-orb-grid {
    min-height: clamp(480px, 58vh, 760px);
    margin-top: 0;
}

.ppb-bottom-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.58rem;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.75rem;
}

.ppb-bottom-actions > * {
    flex: 0 1 auto;
}

.ppb-stage-action-main {
    min-width: 12rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    margin-top: 0;
}

.ppb-stage-action-main:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.ppb-control-panel {
    top: 0.75rem;
}

.ppb-live-card {
    padding: 0.74rem 0.78rem;
}

.ppb-live-meta {
    display: block !important;
    margin: 0.18rem 0 0;
    color: rgba(245, 249, 255, 0.68);
    font-size: 0.78rem;
    font-weight: 800;
}

.ppb-result-panel {
    width: min(1120px, calc(100vw - 2rem));
    min-height: min(78vh, 720px);
    border-radius: 1.15rem;
    background:
        radial-gradient(circle at 50% 10%, rgba(255, 212, 92, 0.18), transparent 30%),
        linear-gradient(160deg, rgba(7, 20, 50, 0.98), rgba(3, 10, 27, 0.96));
    border-color: rgba(255, 255, 255, 0.14);
}

.ppb-result-panel > :not(.ppb-result-burst) {
    position: relative;
    z-index: 1;
}

.ppb-result-burst {
    opacity: 0.24;
    z-index: 0;
}

.ppb-result-panel .ppb-result-source {
    display: none !important;
}

.ppb-result-panel .ppb-result-phase,
.ppb-result-panel .ppb-result-label,
.ppb-result-panel .ppb-result-meta,
.ppb-result-panel .ppb-result-wait:not([hidden]) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.ppb-result-panel .ppb-result-compliment {
    display: block !important;
}

.ppb-result-label,
.ppb-result-meta,
.ppb-result-wait {
    color: rgba(245, 249, 255, 0.72);
    font-size: 0.86rem;
    font-weight: 850;
}

.ppb-result-name {
    max-width: 12ch;
    overflow-wrap: anywhere;
    word-break: keep-all;
    font-size: clamp(4.1rem, 11vw, 8rem);
}

@media (max-width: 1180px) {
    .ppb-start-shell,
    .ppb-stage-layout {
        grid-template-columns: 1fr;
    }

    .ppb-control-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    .ppb-start-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .ppb-start-flow {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ppb-start-flow span {
        justify-content: center;
    }

    .ppb-start-card-main .ppb-textarea {
        min-height: 300px;
    }

    .ppb-start-preview-board {
        min-height: 8.6rem;
    }

    .ppb-student-display-card {
        min-height: 8.25rem;
        padding: 0.9rem;
    }

    .ppb-student-display-card h2 {
        font-size: clamp(2.25rem, 13vw, 4.2rem);
    }

    .ppb-orb-grid {
        min-height: 390px;
    }

    .ppb-bottom-actions > *,
    .ppb-stage-action-main {
        width: 100%;
        min-width: 0;
    }

    .ppb-result-panel {
        width: min(620px, calc(100vw - 1rem));
        min-height: min(72vh, 560px);
        padding: 1.25rem 1rem;
    }

    .ppb-result-name {
        font-size: clamp(3.2rem, 18vw, 5.4rem);
    }
}

/* Classroom reveal pass: ladder and meteor need visible drama, not instructions */
.pbl-stage-spotlight,
.ppm-stage-spotlight {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 0.45rem;
    margin: 0.55rem 0 0.65rem;
    padding: clamp(0.78rem, 1.2vw, 1rem);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    background:
        radial-gradient(circle at 88% 12%, rgba(255, 212, 92, 0.2), transparent 30%),
        linear-gradient(135deg, rgba(6, 20, 49, 0.98), rgba(14, 36, 77, 0.92));
    box-shadow: 0 20px 46px rgba(2, 6, 23, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pbl-stage-spotlight-label,
.ppm-stage-spotlight-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #c9f6ff;
    font-size: 0.78rem;
    font-weight: 900;
}

.pbl-stage-spotlight-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
}

.pbl-stage-spotlight strong,
.ppm-stage-spotlight strong {
    max-width: 12ch;
    color: #ffffff;
    font-family: var(--ppb-display-font);
    font-size: clamp(2.15rem, 4.6vw, 4.25rem);
    line-height: 0.95;
    word-break: keep-all;
    overflow-wrap: anywhere;
    text-shadow: 0 18px 44px rgba(110, 231, 255, 0.2);
}

.pbl-stage-spotlight span[id],
.pbl-stage-spotlight p,
.ppm-stage-spotlight p {
    margin: 0;
    color: #fff4bf;
    font-size: clamp(1rem, 1.5vw, 1.24rem);
    font-weight: 900;
}

.pbl-board-wrap {
    position: relative;
    min-height: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(110, 231, 255, 0.16), transparent 42%),
        linear-gradient(180deg, rgba(4, 13, 34, 0.98), rgba(7, 19, 45, 0.94));
}

.pbl-board-wrap.is-tracing {
    border-color: rgba(110, 231, 255, 0.42);
    box-shadow: 0 0 0 1px rgba(110, 231, 255, 0.12), 0 22px 52px rgba(8, 145, 178, 0.18);
}

.pbl-board-wrap.is-revealed {
    border-color: rgba(255, 212, 92, 0.38);
    box-shadow: 0 0 0 1px rgba(255, 212, 92, 0.12), 0 22px 56px rgba(255, 212, 92, 0.12);
}

.pbl-top-node,
.pbl-bottom-node {
    min-height: 3.55rem;
    color: #ffffff;
    border-width: 1px;
}

.pbl-node-name,
.pbl-bottom-node {
    font-size: clamp(0.9rem, 1.05vw, 1.08rem);
    font-weight: 900;
}

.pbl-top-node.is-tracing {
    border-color: rgba(110, 231, 255, 0.9);
    background: rgba(8, 145, 178, 0.28);
    box-shadow: 0 0 0 2px rgba(110, 231, 255, 0.18), 0 16px 32px rgba(8, 145, 178, 0.26);
}

.pbl-top-node.is-current,
.pbl-bottom-node.is-current {
    border-color: rgba(255, 212, 92, 0.96);
    background:
        radial-gradient(circle at top, rgba(255, 212, 92, 0.3), transparent 52%),
        rgba(120, 53, 15, 0.72);
    color: #fff4bf;
    box-shadow: 0 0 0 2px rgba(255, 212, 92, 0.22), 0 20px 42px rgba(255, 212, 92, 0.18);
}

.pbl-bottom-node.is-prize.is-current {
    border-color: rgba(74, 222, 128, 0.95);
    background:
        radial-gradient(circle at top, rgba(74, 222, 128, 0.28), transparent 55%),
        rgba(20, 83, 45, 0.76);
    color: #dcfce7;
}

.pbl-svg-wrap {
    min-height: clamp(300px, 32vh, 430px);
}

.pbl-svg {
    height: clamp(300px, 32vh, 430px);
}

.pbl-line-v {
    stroke: rgba(191, 219, 254, 0.66);
    stroke-width: 6;
}

.pbl-line-h {
    stroke: rgba(251, 207, 232, 0.68);
    stroke-width: 7.5;
}

.pbl-path-active {
    stroke: #ffe66d;
    stroke-width: 14;
    filter:
        drop-shadow(0 0 10px rgba(255, 230, 109, 0.96))
        drop-shadow(0 0 24px rgba(110, 231, 255, 0.5));
}

.pbl-live-card,
.ppm-live-card {
    border-color: rgba(255, 212, 92, 0.34);
    background:
        radial-gradient(circle at top right, rgba(255, 212, 92, 0.18), transparent 36%),
        linear-gradient(180deg, rgba(13, 33, 72, 0.94), rgba(5, 16, 39, 0.9));
}

.pbl-live-name,
.ppm-live-name {
    color: #ffffff;
    font-size: clamp(2.05rem, 3.5vw, 3.2rem);
    line-height: 1.02;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.pbl-live-role,
.ppm-live-meta {
    display: block !important;
    color: #fff4bf;
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    font-weight: 900;
}

.ppm-stage-spotlight {
    margin-bottom: 0.65rem;
    background:
        radial-gradient(circle at 84% 18%, rgba(125, 211, 252, 0.22), transparent 30%),
        radial-gradient(circle at 16% 18%, rgba(255, 212, 92, 0.18), transparent 28%),
        linear-gradient(135deg, rgba(3, 10, 27, 0.98), rgba(12, 30, 68, 0.94));
}

.ppm-sky {
    min-height: clamp(390px, 41vh, 540px);
    background:
        radial-gradient(circle at 50% 0%, rgba(125, 211, 252, 0.2), transparent 34%),
        radial-gradient(circle at 18% 24%, rgba(255, 212, 92, 0.13), transparent 24%),
        radial-gradient(circle at 78% 78%, rgba(255, 141, 115, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(1, 6, 20, 0.99), rgba(8, 20, 48, 0.94));
}

.ppm-sky.is-meteor-falling {
    border-color: rgba(125, 211, 252, 0.46);
}

.ppm-sky.is-meteor-landed {
    border-color: rgba(255, 212, 92, 0.42);
}

.ppm-meteor {
    width: 230px;
    height: 88px;
    filter: drop-shadow(0 0 18px rgba(125, 211, 252, 0.38));
}

.ppm-meteor:hover,
.ppm-meteor:focus-visible {
    filter: drop-shadow(0 0 28px rgba(255, 212, 92, 0.48));
}

.ppm-meteor-core {
    right: 22px;
    width: 34px;
    height: 34px;
    background:
        radial-gradient(circle at 30% 30%, #ffffff 0 18%, #fff4bf 34%, #67e8f9 68%, rgba(103, 232, 249, 0.08) 100%);
    box-shadow:
        0 0 24px rgba(255, 244, 191, 0.95),
        0 0 58px rgba(103, 232, 249, 0.46),
        0 0 92px rgba(255, 212, 92, 0.22);
}

.ppm-meteor-core::after {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: inherit;
    border: 2px solid rgba(255, 255, 255, 0.56);
}

.ppm-meteor-tail {
    left: 8px;
    width: 184px;
    height: 22px;
    background:
        linear-gradient(90deg, rgba(125, 211, 252, 0), rgba(125, 211, 252, 0.18) 20%, rgba(255, 212, 92, 0.78) 72%, rgba(255, 244, 191, 0.98) 100%);
    clip-path: polygon(0 50%, 72% 8%, 100% 50%, 72% 92%);
    box-shadow: 0 0 30px rgba(125, 211, 252, 0.38);
}

.ppm-impact-meteor {
    width: 320px;
    height: 120px;
    z-index: 12;
    filter: drop-shadow(0 0 30px rgba(125, 211, 252, 0.52));
}

.ppm-impact-core {
    right: 24px;
    width: 46px;
    height: 46px;
}

.ppm-impact-tail {
    left: 18px;
    width: 244px;
    height: 24px;
    clip-path: polygon(0 50%, 74% 8%, 100% 50%, 74% 92%);
}

.ppm-impact-name {
    top: calc(100% + 0.2rem);
    padding: 0.45rem 0.9rem;
    font-size: 1.08rem;
}

@media (max-width: 860px) {
    .pbl-stage-spotlight strong,
    .ppm-stage-spotlight strong {
        font-size: clamp(2.3rem, 14vw, 4rem);
    }

    .pbl-svg-wrap,
    .pbl-svg {
        min-height: 320px;
        height: 320px;
    }

    .ppm-sky {
        min-height: 380px;
    }

    .ppm-meteor {
        width: 170px;
        height: 66px;
    }

    .ppm-meteor-tail {
        width: 132px;
        height: 16px;
    }

    .ppm-meteor-core {
        width: 28px;
        height: 28px;
    }
}

/* Threads-inspired teacher ball mode: visible draw process with selectable teacher character */
.pbo-character-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.46rem;
    padding: 0.42rem;
    border-radius: 0.95rem;
    background:
        radial-gradient(circle at 8% 10%, rgba(110, 231, 255, 0.12), transparent 38%),
        rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pbo-character-option {
    position: relative;
    display: flex;
    min-width: 0;
    cursor: pointer;
}

.pbo-character-option input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
}

.pbo-character-option span {
    width: 100%;
    min-height: 2.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.48rem 0.52rem;
    border-radius: 0.72rem;
    color: rgba(245, 249, 255, 0.82);
    font-size: 0.84rem;
    font-weight: 900;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.pbo-character-option input:checked + span {
    color: #fff8cf;
    background:
        linear-gradient(135deg, rgba(255, 212, 92, 0.26), rgba(110, 231, 255, 0.18)),
        rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 212, 92, 0.36);
    box-shadow: 0 14px 30px rgba(255, 212, 92, 0.12);
}

.pbo-character-option input:focus-visible + span {
    outline: 2px solid rgba(110, 231, 255, 0.74);
    outline-offset: 2px;
}

.pbo-stage-shell {
    width: min(1480px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 0.82rem;
    align-items: start;
}

.pbo-stage-main,
.pbo-side-panel {
    min-width: 0;
}

.pbo-stage-main {
    display: grid;
    gap: 0.62rem;
}

.pbo-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.pbo-stage-title {
    text-align: left;
}

.pbo-stage-character-switch {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.28rem;
    padding: 0.28rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.11);
}

.pbo-stage-character-btn {
    min-width: 3.9rem;
    border: 0;
    border-radius: 999px;
    padding: 0.46rem 0.76rem;
    color: rgba(245, 249, 255, 0.8);
    background: transparent;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.pbo-stage-character-btn.is-active {
    color: #082f49;
    background: linear-gradient(145deg, #fff4bf, #67e8f9);
    box-shadow: 0 8px 18px rgba(103, 232, 249, 0.18);
}

.pbo-stage-character-btn:disabled {
    cursor: not-allowed;
    opacity: 0.54;
}

.pbo-stage-character-btn:focus-visible {
    outline: 2px solid rgba(255, 244, 191, 0.85);
    outline-offset: 2px;
}

.pbo-stage-spotlight {
    position: relative;
    overflow: hidden;
    display: grid;
    justify-items: center;
    gap: 0.38rem;
    min-width: 0;
    margin: 0.1rem 0 0.2rem;
    padding: 0.1rem 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.pbo-stage-spotlight::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 0 32%, rgba(255, 255, 255, 0.08) 42%, transparent 54% 100%);
    transform: translateX(-120%);
    opacity: 0;
    pointer-events: none;
}

.pbo-arena.is-grabbing ~ *,
.pbo-stage-spotlight:has(+ .pbo-stage-message + .pbo-arena.is-grabbing)::after {
    animation: pboSpotSweep 0.72s ease-out;
}

.pbo-stage-spotlight-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(245, 249, 255, 0.78);
    font-size: 0.76rem;
    font-weight: 900;
}

.pbo-stage-spotlight strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.pbo-stage-spotlight p {
    margin: 0;
    color: rgba(255, 244, 191, 0.86);
    font-size: 0.86rem;
    font-weight: 800;
}

.pbo-draw-slots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: min(100%, 24rem);
    min-height: 3.25rem;
}

.pbo-draw-slot {
    display: inline-grid;
    place-items: center;
    min-width: clamp(3.5rem, 7vw, 5.4rem);
    max-width: 100%;
    height: clamp(3rem, 5.8vw, 4.6rem);
    padding: 0 0.75rem;
    border-radius: 999px;
    color: rgba(15, 23, 42, 0.72);
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.88), transparent 23%),
        rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-family: var(--ppb-display-font);
    font-size: clamp(1.4rem, 2.8vw, 2.3rem);
    font-weight: 900;
    line-height: 1.02;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.18);
}

.pbo-draw-slot.is-spinning {
    animation: pboSlotPulse 0.38s ease-in-out infinite;
}

.pbo-draw-slot.is-revealed {
    min-width: clamp(6.2rem, 11vw, 9.5rem);
    max-width: min(100%, 19rem);
    color: #082f49;
    background:
        radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.92), transparent 21%),
        linear-gradient(145deg, #fff4bf, #67e8f9 62%, #22c55e);
    border-color: rgba(255, 244, 191, 0.72);
    animation: pboSlotReveal 0.52s ease-out;
}

.pbo-arena {
    position: relative;
    overflow: hidden;
    min-height: clamp(430px, 48vh, 600px);
    border-radius: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background:
        radial-gradient(circle at 86% 18%, rgba(255, 212, 92, 0.22), transparent 26%),
        radial-gradient(circle at 14% 18%, rgba(110, 231, 255, 0.18), transparent 28%),
        radial-gradient(circle at 45% 96%, rgba(52, 211, 153, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(7, 18, 40, 0.99), rgba(10, 16, 31, 0.96));
    box-shadow: 0 24px 62px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    isolation: isolate;
}

.pbo-arena::before {
    content: "";
    position: absolute;
    left: 5%;
    right: 5%;
    bottom: 4.5rem;
    height: 20%;
    border-radius: 999px 999px 42% 42%;
    background:
        radial-gradient(ellipse at center, rgba(110, 231, 255, 0.16), transparent 64%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: perspective(620px) rotateX(58deg);
    z-index: 0;
}

.pbo-arena-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(110, 231, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(110, 231, 255, 0.045) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.06));
}

.pbo-rig {
    position: absolute;
    left: 50%;
    top: clamp(1rem, 2.5vw, 1.7rem);
    width: clamp(128px, 13vw, 176px);
    height: clamp(138px, 15vw, 196px);
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
    animation: pboHostIdle 3.8s ease-in-out infinite;
}

.pbo-rig::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 92%;
    height: 46%;
    transform: translateX(-50%);
    border-radius: 42% 42% 0.9rem 0.9rem;
    background:
        linear-gradient(135deg, rgba(96, 165, 250, 0.9), rgba(52, 211, 153, 0.78)),
        #1d4ed8;
    border: 2px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 16px 28px rgba(2, 6, 23, 0.22);
}

.pbo-rig::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -3%;
    width: 112%;
    height: 13%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(ellipse at center, rgba(2, 6, 23, 0.34), transparent 70%);
    opacity: 0.36;
}

.pbo-arena.is-aiming .pbo-rig,
.pbo-arena.is-grabbing .pbo-rig,
.pbo-arena.is-complete .pbo-rig {
    animation: pboHostReady 0.72s ease-out;
}

.pbo-character {
    position: absolute;
    left: 50%;
    top: 0;
    width: 72%;
    height: 74%;
    transform: translateX(-50%);
    z-index: 2;
}

.pbo-character-face {
    position: absolute;
    top: clamp(25px, 2.4vw, 34px);
    left: 50%;
    width: 72%;
    height: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 45% 45%;
    background:
        radial-gradient(circle at 31% 26%, rgba(255, 255, 255, 0.62), transparent 12%),
        linear-gradient(145deg, #ffe3bd, #f2b177);
    border: 2px solid rgba(255, 245, 222, 0.42);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22), inset 0 -8px 18px rgba(151, 87, 43, 0.12);
    z-index: 4;
}

.pbo-character-face::before,
.pbo-character-face::after {
    content: "";
    position: absolute;
    top: 52%;
    width: 12%;
    height: 8%;
    border-radius: 999px;
    background: rgba(244, 114, 182, 0.16);
}

.pbo-character-face::before {
    left: 18%;
}

.pbo-character-face::after {
    right: 18%;
}

.pbo-character-hair {
    position: absolute;
    top: clamp(3px, 0.44vw, 8px);
    left: 50%;
    width: 88%;
    height: clamp(48px, 4.9vw, 66px);
    transform: translateX(-50%);
    border-radius: 999px 999px 30px 30px;
    background:
        radial-gradient(circle at 22% 62%, #2d2118 0 18%, transparent 19%),
        linear-gradient(145deg, #5b3b27, #2d2118 64%, #21160f);
    box-shadow: 0 6px 14px rgba(2, 6, 23, 0.16);
    z-index: 2;
}

.pbo-character-hair::before {
    content: "";
    position: absolute;
    left: 2%;
    bottom: -13%;
    width: 27%;
    height: 46%;
    border-radius: 999px 999px 18px 18px;
    background: linear-gradient(160deg, #4b3020, #24170f);
    transform: rotate(12deg);
}

.pbo-character-hair::after {
    content: "";
    position: absolute;
    left: 30%;
    right: 24%;
    bottom: -5%;
    height: 18%;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, #3f2a1d, #26180f);
    transform: rotate(-2deg);
}

.pbo-character-eye {
    position: absolute;
    top: 41%;
    width: clamp(6px, 0.72vw, 9px);
    height: clamp(6px, 0.72vw, 9px);
    border-radius: 999px;
    background: #0f172a;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.24);
}

.pbo-eye-left {
    left: 29%;
}

.pbo-eye-right {
    right: 29%;
}

.pbo-character-mouth {
    position: absolute;
    left: 50%;
    bottom: 25%;
    width: 28%;
    height: 8px;
    transform: translateX(-50%);
    border-bottom: 2px solid rgba(15, 23, 42, 0.72);
    border-radius: 0 0 999px 999px;
}

.pbo-character-neck {
    position: absolute;
    left: 50%;
    top: 70%;
    width: 28%;
    height: 24px;
    transform: translateX(-50%);
    border-radius: 0 0 999px 999px;
    background: #f0b884;
}

.pbo-character-body {
    position: absolute;
    left: 50%;
    bottom: 0;
    display: none;
    width: 70%;
    height: 34%;
    transform: translateX(-50%);
    border-radius: 28px 28px 18px 18px;
    background:
        linear-gradient(135deg, rgba(96, 165, 250, 0.92), rgba(52, 211, 153, 0.82)),
        #1d4ed8;
    border: 2px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.26);
}

.pbo-character-body::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 5px;
    width: 46%;
    height: 18px;
    transform: translateX(-50%);
    border-radius: 0 0 12px 12px;
    background:
        linear-gradient(135deg, transparent 0 34%, #ffffff 36% 58%, transparent 60% 100%),
        linear-gradient(225deg, transparent 0 34%, #ffffff 36% 58%, transparent 60% 100%);
    filter: drop-shadow(0 2px 0 rgba(15, 23, 42, 0.12));
}

.pbo-character-body::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 16px;
    width: 10px;
    height: 24px;
    transform: translateX(-50%);
    border-radius: 999px 999px 8px 8px;
    background: linear-gradient(180deg, #ffe66d, #f97316);
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.18);
}

.pbo-character.is-male-teacher .pbo-character-face,
.pbo-character.is-female-teacher .pbo-character-face {
    border-radius: 50% 50% 45% 45%;
    background:
        radial-gradient(circle at 31% 26%, rgba(255, 255, 255, 0.62), transparent 12%),
        linear-gradient(145deg, #ffe3bd, #f2b177);
}

.pbo-character.is-male-teacher .pbo-character-hair {
    top: clamp(3px, 0.44vw, 8px);
    width: 88%;
    height: clamp(48px, 4.9vw, 66px);
    border-radius: 999px 999px 30px 30px;
    background:
        radial-gradient(circle at 22% 62%, #2d2118 0 18%, transparent 19%),
        linear-gradient(145deg, #5b3b27, #2d2118 64%, #21160f);
}

.pbo-character.is-male-teacher .pbo-character-body {
    background:
        linear-gradient(135deg, rgba(96, 165, 250, 0.92), rgba(52, 211, 153, 0.82)),
        #1d4ed8;
}

.pbo-character.is-female-teacher .pbo-character-hair {
    top: clamp(0px, 0.2vw, 4px);
    width: 98%;
    height: clamp(66px, 6.9vw, 92px);
    border-radius: 999px 999px 34px 34px;
    background:
        radial-gradient(circle at 78% 16%, #facc15 0 9%, transparent 10%),
        linear-gradient(145deg, #52341e, #23150d);
    z-index: 2;
}

.pbo-character.is-female-teacher .pbo-character-face {
    top: clamp(31px, 2.8vw, 40px);
    width: 70%;
    height: 49%;
    z-index: 4;
}

.pbo-character.is-female-teacher .pbo-character-hair::before {
    left: 3%;
    bottom: -34%;
    width: 22%;
    height: 82%;
    border-radius: 999px 999px 24px 22px;
    transform: rotate(7deg);
}

.pbo-character.is-female-teacher .pbo-character-hair::after {
    left: auto;
    right: 3%;
    bottom: -34%;
    width: 22%;
    height: 82%;
    border-radius: 999px 999px 22px 24px;
    transform: rotate(-7deg);
}

.pbo-character.is-female-teacher .pbo-character-body {
    background:
        linear-gradient(135deg, rgba(251, 113, 133, 0.9), rgba(255, 212, 92, 0.82)),
        #be123c;
}

.pbo-character.is-female-teacher .pbo-character-body::after {
    width: 22px;
    height: 10px;
    top: 20px;
    border-radius: 999px;
    background: #ffffff;
}

.pbo-arm {
    position: absolute;
    left: 50%;
    top: 50%;
    width: clamp(178px, 17vw, 246px);
    height: clamp(166px, 18vw, 238px);
    transform: translateX(-50%) rotate(var(--pbo-arm-tilt, 0deg));
    transform-origin: 50% 12%;
    z-index: 8;
    animation: pboArmIdle 3.2s ease-in-out infinite;
}

.pbo-arm-rail {
    display: block;
    position: absolute;
    left: 7%;
    top: 26%;
    width: 43%;
    height: clamp(15px, 1.45vw, 21px);
    border-radius: 999px;
    transform: rotate(24deg);
    transform-origin: 92% 50%;
    background: linear-gradient(90deg, #f4bd82, #ffe3bd 62%, #f1b47d);
    box-shadow: inset 0 -4px 8px rgba(151, 87, 43, 0.12), 0 8px 14px rgba(2, 6, 23, 0.16);
    z-index: 2;
}

.pbo-arm-rail::before,
.pbo-arm-rail::after {
    content: "";
    position: absolute;
    border-radius: 999px;
}

.pbo-arm-rail::before {
    right: -8px;
    top: 50%;
    width: clamp(22px, 2.2vw, 32px);
    height: clamp(20px, 2vw, 30px);
    transform: translateY(-50%) rotate(-12deg);
    background:
        radial-gradient(circle at 32% 28%, #fff7ed, #f7c48c 54%, #d98a4d 100%);
    border: 2px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 8px 12px rgba(2, 6, 23, 0.18);
}

.pbo-arm-rail::after {
    left: -6px;
    top: 50%;
    width: clamp(28px, 3vw, 42px);
    height: clamp(22px, 2.2vw, 32px);
    transform: translateY(-50%) rotate(-4deg);
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    border: 2px solid rgba(255, 255, 255, 0.28);
}

.pbo-arm::before,
.pbo-arm::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.pbo-arm::before {
    left: 70%;
    top: 15%;
    width: clamp(30px, 2.8vw, 42px);
    height: clamp(24px, 2.25vw, 34px);
    transform: translateX(-50%);
    border-radius: 999px 999px 18px 18px;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.8), transparent 23%),
        linear-gradient(145deg, #60a5fa, #2563eb);
    border: 2px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 8px 16px rgba(2, 6, 23, 0.2);
}

.pbo-arm::after {
    left: 58%;
    bottom: 6%;
    width: 48%;
    height: 10%;
    transform: translateX(-50%) rotate(-10deg);
    background: radial-gradient(ellipse at center, rgba(2, 6, 23, 0.24), transparent 68%);
    opacity: 0.42;
}

.pbo-arm-joint,
.pbo-arm-link,
.pbo-claw {
    display: block;
    position: absolute;
}

.pbo-arm-joint {
    width: clamp(18px, 1.7vw, 24px);
    height: clamp(18px, 1.7vw, 24px);
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 8px 14px rgba(2, 6, 23, 0.18);
}

.pbo-arm-joint-a {
    left: 70%;
    top: 17%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #dff9ff, #60a5fa 58%, #2563eb);
    z-index: 5;
}

.pbo-arm-link-a {
    left: 70%;
    top: 17%;
    width: clamp(20px, 1.7vw, 26px);
    height: clamp(68px, 6.7vw, 92px);
    border-radius: 999px;
    transform: translateX(-50%) rotate(var(--pbo-upper-arm, 7deg));
    transform-origin: 50% 6%;
    background: linear-gradient(180deg, #bfdbfe, #38bdf8 58%, #2563eb);
    box-shadow: inset -5px -10px 14px rgba(30, 64, 175, 0.2), 0 0 18px rgba(56, 189, 248, 0.18);
    z-index: 2;
}

.pbo-arm-joint-b {
    left: 74%;
    top: 51%;
    transform: translate(-50%, -50%) rotate(4deg);
    background: linear-gradient(145deg, #ffe7c2, #efb075);
    z-index: 5;
}

.pbo-arm-link-b {
    left: 74%;
    top: 51%;
    width: clamp(19px, 1.55vw, 24px);
    height: clamp(72px, 7.2vw, 102px);
    border-radius: 999px;
    transform: translateX(-50%) rotate(var(--pbo-lower-arm, -28deg));
    transform-origin: 50% 8%;
    background: linear-gradient(180deg, #ffe7c2, #f1b47d 66%, #c7783d);
    box-shadow: inset -4px -8px 12px rgba(151, 87, 43, 0.13);
    z-index: 3;
}

.pbo-claw {
    left: 62%;
    top: 82%;
    width: clamp(42px, 4.4vw, 62px);
    height: clamp(40px, 4.2vw, 58px);
    transform: translateX(-50%) rotate(var(--pbo-hand-turn, 4deg));
    transform-origin: 50% 12%;
    transition: transform 0.18s ease;
    z-index: 6;
}

.pbo-claw::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 20%;
    width: 62%;
    height: 62%;
    transform: translateX(-50%);
    border-radius: 48% 48% 42% 42%;
    background: linear-gradient(145deg, #ffe2ba, #f1b47d);
    box-shadow: 0 10px 18px rgba(2, 6, 23, 0.22), inset 0 -4px 0 rgba(151, 87, 43, 0.12);
}

.pbo-claw::after {
    content: "";
    position: absolute;
    right: 10%;
    bottom: 24%;
    width: 24%;
    height: 44%;
    transform: rotate(-38deg);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffe2ba, #efad72);
    box-shadow: inset 0 -3px 0 rgba(151, 87, 43, 0.12);
}

.pbo-claw span {
    position: absolute;
    bottom: 4%;
    width: 22%;
    height: 48%;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffe2ba, #efad72);
    box-shadow: inset 0 -3px 0 rgba(151, 87, 43, 0.14);
    transform-origin: top center;
}

.pbo-claw span:first-child {
    left: 28%;
    transform: rotate(6deg);
}

.pbo-claw span:last-child {
    right: 28%;
    transform: rotate(-6deg);
}

.pbo-arena.is-grabbing .pbo-claw {
    transform: translateX(-50%) translateY(5px) rotate(-7deg) scale(0.94);
}

.pbo-arena.is-grabbing .pbo-claw span:first-child {
    transform: rotate(-3deg) translateX(7px);
}

.pbo-arena.is-grabbing .pbo-claw span:last-child {
    transform: rotate(3deg) translateX(-7px);
}

.pbo-arena.is-aiming .pbo-arm,
.pbo-arena.is-chaos .pbo-arm {
    animation: pboArmStir 0.68s ease-in-out infinite;
}

.pbo-arena.is-aiming .pbo-arm-link-a,
.pbo-arena.is-chaos .pbo-arm-link-a {
    animation: pboUpperArmStir 0.68s ease-in-out infinite;
}

.pbo-arena.is-aiming .pbo-arm-link-b,
.pbo-arena.is-chaos .pbo-arm-link-b {
    animation: pboLowerArmStir 0.68s ease-in-out infinite;
}

.pbo-arena.is-aiming .pbo-claw,
.pbo-arena.is-chaos .pbo-claw {
    animation: pboHandStir 0.68s ease-in-out infinite;
}

.pbo-arena.is-grabbing .pbo-arm {
    animation: pboArmGrab 0.5s ease-out both;
}

.pbo-arena.is-grabbing .pbo-arm-link-a,
.pbo-arena.is-grabbing .pbo-arm-link-b,
.pbo-arena.is-grabbing .pbo-claw {
    animation: none;
}

.pbo-arm {
    left: 50%;
    top: 45%;
    width: clamp(178px, 17vw, 246px);
    height: clamp(178px, 18vw, 250px);
    transform: translateX(-50%);
    transform-origin: 50% 18%;
    animation: pboArmSvgIdle 3.4s ease-in-out infinite;
}

.pbo-arm::before,
.pbo-arm::after {
    display: none;
}

.pbo-arm-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.pbo-arm-svg path,
.pbo-arm-svg circle,
.pbo-arm-svg ellipse {
    vector-effect: non-scaling-stroke;
}

.pbo-rest-sleeve,
.pbo-upper-arm-sleeve {
    fill: none;
    stroke: #5aaaf2;
    stroke-width: 24;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pbo-rest-forearm,
.pbo-lower-arm-skin {
    fill: none;
    stroke: #f0b783;
    stroke-width: 22;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pbo-shoulder-dot,
.pbo-elbow-dot {
    fill: #74c6ff;
    stroke: rgba(255, 255, 255, 0.58);
    stroke-width: 3;
}

.pbo-elbow-dot {
    fill: #f2bb83;
}

.pbo-rest-hand,
.pbo-hand ellipse,
.pbo-hand path {
    fill: #f3bd87;
    stroke: rgba(255, 245, 222, 0.72);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pbo-working-arm,
.pbo-upper-arm,
.pbo-lower-arm {
    transform-box: view-box;
}

.pbo-working-arm {
    transform-origin: 136px 50px;
}

.pbo-upper-arm {
    transform-origin: 136px 50px;
}

.pbo-lower-arm {
    transform-origin: 150px 108px;
}

.pbo-arena.is-aiming .pbo-arm,
.pbo-arena.is-chaos .pbo-arm {
    animation: pboArmSvgStirBase 0.72s ease-in-out infinite;
}

.pbo-arena.is-aiming .pbo-upper-arm,
.pbo-arena.is-chaos .pbo-upper-arm {
    animation: pboSvgUpperStir 0.72s ease-in-out infinite;
}

.pbo-arena.is-aiming .pbo-lower-arm,
.pbo-arena.is-chaos .pbo-lower-arm {
    animation: pboSvgLowerStir 0.72s ease-in-out infinite;
}

.pbo-arena.is-grabbing .pbo-arm {
    animation: pboArmSvgGrabBase 0.5s ease-out both;
}

.pbo-arena.is-grabbing .pbo-upper-arm {
    animation: pboSvgUpperGrab 0.5s ease-out both;
}

.pbo-arena.is-grabbing .pbo-lower-arm {
    animation: pboSvgLowerGrab 0.5s ease-out both;
}

.pbo-arena.is-complete .pbo-character {
    animation: none;
}

.pbo-ball-field {
    position: absolute;
    left: clamp(0.9rem, 2.6vw, 2.2rem);
    right: clamp(0.9rem, 2.6vw, 2.2rem);
    bottom: clamp(4.3rem, 6.8vw, 5.6rem);
    height: clamp(210px, 34vh, 318px);
    z-index: 2;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(201, 246, 255, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
        rgba(201, 246, 255, 0.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 36px rgba(2, 6, 23, 0.18);
}

.pbo-ball-field::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent 44%),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.14), transparent 32%);
    opacity: 0.6;
    z-index: 1;
}

.pbo-ball {
    position: absolute;
    left: var(--pbo-left);
    top: var(--pbo-top);
    width: clamp(50px, 5.4vw, 70px);
    height: clamp(50px, 5.4vw, 70px);
    transform: translate(-50%, -50%) rotate(var(--pbo-spin));
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: #0f172a;
    background:
        radial-gradient(circle at 30% 26%, #ffffff 0 14%, hsla(var(--pbo-hue), 95%, 78%, 0.96) 28%, hsla(calc(var(--pbo-hue) + 18), 82%, 48%, 0.98) 68%, hsla(calc(var(--pbo-hue) + 34), 82%, 30%, 0.98) 100%);
    box-shadow:
        inset -10px -14px 22px rgba(15, 23, 42, 0.24),
        0 16px 30px rgba(2, 6, 23, 0.32),
        0 0 0 1px rgba(255, 255, 255, 0.24);
    animation: pboBallFloat var(--pbo-duration) ease-in-out var(--pbo-delay) infinite;
    z-index: 2;
}

.pbo-arena.is-chaos .pbo-ball:not(.is-target) {
    animation: pboBallChaos 0.58s ease-in-out infinite;
}

.pbo-ball:hover,
.pbo-ball:focus-visible {
    outline: none;
    box-shadow:
        inset -10px -14px 22px rgba(15, 23, 42, 0.2),
        0 20px 38px rgba(2, 6, 23, 0.34),
        0 0 0 3px rgba(110, 231, 255, 0.52);
}

.pbo-ball.is-target {
    width: clamp(68px, 7.4vw, 96px);
    height: clamp(68px, 7.4vw, 96px);
    color: #082f49;
    z-index: 7;
    animation: pboTargetPulse 0.62s ease-in-out infinite;
    box-shadow:
        inset -12px -16px 28px rgba(15, 23, 42, 0.17),
        0 24px 50px rgba(255, 212, 92, 0.24),
        0 0 0 5px rgba(255, 212, 92, 0.32),
        0 0 62px rgba(110, 231, 255, 0.44);
}

.pbo-ball.is-captured {
    z-index: 8;
    pointer-events: none;
    animation: pboCapturePop 0.62s ease-out forwards;
}

.pbo-ball-shine {
    position: absolute;
    inset: 13% auto auto 16%;
    width: 28%;
    height: 22%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    filter: blur(0.5px);
}

.pbo-ball-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0.3rem;
    font-family: var(--ppb-display-font);
    font-size: clamp(0.9rem, 1.6vw, 1.42rem);
    font-weight: 900;
    line-height: 1.02;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.pbo-ball.is-target .pbo-ball-label {
    font-size: clamp(1.05rem, 2vw, 1.72rem);
}

.pbo-capture-bay {
    position: absolute;
    right: clamp(1rem, 3vw, 2.6rem);
    bottom: clamp(1rem, 2vw, 1.6rem);
    z-index: 3;
    display: grid;
    place-items: center;
    width: clamp(136px, 16vw, 210px);
    min-height: 3.8rem;
    padding: 0.72rem;
    border-radius: 1rem;
    background:
        radial-gradient(circle at top, rgba(255, 212, 92, 0.18), transparent 56%),
        rgba(2, 6, 23, 0.58);
    border: 1px solid rgba(255, 212, 92, 0.24);
    color: #fff4bf;
    font-family: var(--ppb-display-font);
    font-size: clamp(1rem, 1.6vw, 1.36rem);
    font-weight: 900;
    line-height: 1.08;
    text-align: center;
    overflow: hidden;
    overflow-wrap: anywhere;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pbo-bottom-actions {
    margin-top: 0.75rem;
}

.pbo-bottom-actions .ppb-primary-btn,
.pbo-bottom-actions .ppb-soft-btn,
.pbo-bottom-actions .ppb-ghost-btn {
    width: auto;
    margin-top: 0;
}

.pbo-bottom-actions .ppb-primary-btn {
    min-width: 10.5rem;
}

.pbo-bottom-actions > * {
    flex: 0 0 auto;
}

.pbo-bottom-actions .ppb-stage-more {
    margin: 0;
}

.pbo-bottom-actions .ppb-stage-more-toggle {
    display: inline-flex;
}

.pbo-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.2rem;
    color: rgba(245, 249, 255, 0.72);
    font-weight: 900;
    text-align: center;
}

.pbo-empty.is-complete {
    color: #fff4bf;
}

.pbo-side-panel {
    display: grid;
    gap: 0.62rem;
}

.pbo-live-card {
    display: grid;
    gap: 0.42rem;
    justify-items: start;
    min-width: 0;
    min-height: 12rem;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 212, 92, 0.34);
    background:
        radial-gradient(circle at top right, rgba(255, 212, 92, 0.18), transparent 36%),
        radial-gradient(circle at bottom left, rgba(110, 231, 255, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(13, 33, 72, 0.94), rgba(5, 16, 39, 0.9));
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
}

.pbo-live-label {
    margin: 0;
    color: rgba(201, 246, 255, 0.9);
    font-size: 0.74rem;
    font-weight: 900;
}

.pbo-live-order {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
    margin: 0;
    padding: 0.36rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 212, 92, 0.14);
    border: 1px solid rgba(255, 212, 92, 0.26);
    color: rgba(255, 238, 176, 0.96);
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.pbo-live-name {
    max-width: 100%;
    margin: 0;
    color: #ffffff;
    font-family: var(--ppb-display-font);
    font-size: clamp(1.78rem, 3vw, 2.75rem);
    line-height: 1.08;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.pbo-live-meta {
    max-width: 100%;
    margin: 0;
    color: #fff4bf;
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    font-weight: 900;
    line-height: 1.22;
    overflow-wrap: anywhere;
}

.pbo-fortune-btn {
    width: 100%;
    max-width: 280px;
    margin-top: 0.32rem;
}

.pbo-history-box {
    max-height: min(46vh, 420px);
    overflow: auto;
}

.pbo-history-list {
    display: grid;
    gap: 0.46rem;
    margin: 0;
    padding: 0.72rem;
    list-style: none;
}

.pbo-history-list li {
    display: grid;
    gap: 0.16rem;
    padding: 0.65rem 0.7rem;
    border-radius: 0.82rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pbo-history-step {
    color: #c9f6ff;
    font-size: 0.72rem;
    font-weight: 900;
}

.pbo-history-main {
    color: #ffffff;
    font-weight: 900;
    font-size: 1.02rem;
}

/* Reference-style teacherball: small monochrome host, thin box, numbered balls. */
.pbo-stage-shell {
    width: min(760px, 100%);
    grid-template-columns: minmax(0, 1fr);
    gap: 0.56rem;
}

.pbo-stage-shell > .pbo-stage-main > .ppb-chip-row {
    display: none;
}

.pbo-side-panel {
    display: none;
}

.pbo-head {
    position: relative;
    justify-content: center;
    min-height: 2.25rem;
}

.pbo-stage-title {
    color: rgba(226, 232, 240, 0.9);
    font-size: 1rem;
    text-align: center;
}

.pbo-stage-character-switch {
    position: absolute;
    right: 0;
    top: 0;
    background: rgba(15, 23, 42, 0.08);
}

.pbo-stage-character-btn {
    min-width: 3.1rem;
    padding: 0.36rem 0.62rem;
    color: rgba(226, 232, 240, 0.8);
    font-size: 0.78rem;
}

.pbo-stage-character-btn.is-active {
    color: #111827;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.16);
}

.pbo-stage-spotlight {
    gap: 0.26rem;
    padding-top: 0.1rem;
}

.pbo-stage-spotlight-label {
    display: grid;
    gap: 0.16rem;
    justify-items: center;
    color: rgba(148, 163, 184, 0.82);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.pbo-stage-spotlight-label::before {
    content: "CHOJIPJUNG DAY · 4TH";
}

.pbo-stage-spotlight-label .ppb-ui-icon {
    display: none;
}

.pbo-stage-spotlight p {
    color: rgba(203, 213, 225, 0.86);
    font-size: 0.72rem;
}

.pbo-draw-slots {
    width: min(100%, 16rem);
    min-height: 2.7rem;
}

.pbo-draw-slot {
    min-width: 2.6rem;
    max-width: 7.4rem;
    height: 2.6rem;
    padding: 0 0.62rem;
    color: #94a3b8;
    background: rgba(248, 250, 252, 0.82);
    border: 1px solid rgba(203, 213, 225, 0.74);
    font-size: 1.05rem;
    box-shadow: none;
}

.pbo-draw-slot.is-revealed {
    min-width: 3.1rem;
    max-width: 8.2rem;
    color: #ffffff;
    background: #c9a227;
    border-color: #c9a227;
    box-shadow: 0 10px 24px rgba(201, 162, 39, 0.16);
}

.pbo-arena {
    min-height: 430px;
    border-radius: 0.5rem;
    border: 0;
    background: #f8fafc;
    box-shadow: 0 20px 46px rgba(2, 6, 23, 0.18);
    color: #111827;
}

.pbo-arena::before,
.pbo-arena-grid {
    display: none;
}

.pbo-rig {
    top: 142px;
    width: 128px;
    height: 172px;
    z-index: 5;
}

.pbo-rig::before {
    bottom: 32px;
    width: 78%;
    height: 44%;
    border-radius: 28px 28px 8px 8px;
    background: #232323;
    border: 0;
    box-shadow: none;
}

.pbo-rig::after {
    display: none;
}

.pbo-character {
    width: 68%;
    height: 64%;
}

.pbo-character-face {
    top: 24px;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: #f2d7bb;
    border: 0;
    box-shadow: none;
    z-index: 4;
}

.pbo-character-face::before,
.pbo-character-face::after {
    display: none;
}

.pbo-character-hair,
.pbo-character.is-male-teacher .pbo-character-hair {
    top: 15px;
    width: 64px;
    height: 34px;
    border-radius: 999px 999px 10px 10px;
    background: #242424;
    box-shadow: none;
    z-index: 3;
}

.pbo-character-hair::before,
.pbo-character-hair::after {
    display: none;
}

.pbo-character.is-female-teacher .pbo-character-hair {
    top: 13px;
    width: 74px;
    height: 74px;
    border-radius: 999px 999px 18px 18px;
    background: #242424;
    z-index: 2;
}

.pbo-character.is-female-teacher .pbo-character-face {
    top: 27px;
    width: 56px;
    height: 56px;
}

.pbo-character.is-female-teacher .pbo-character-hair::before,
.pbo-character.is-female-teacher .pbo-character-hair::after {
    display: none;
}

.pbo-character-eye {
    top: 43%;
    width: 5px;
    height: 5px;
    background: #111827;
    box-shadow: none;
}

.pbo-eye-left {
    left: 30%;
}

.pbo-eye-right {
    right: 30%;
}

.pbo-character-mouth {
    bottom: 26%;
    width: 22%;
    height: 6px;
    border-bottom: 2px solid #111827;
}

.pbo-character-neck {
    top: 69%;
    width: 22px;
    height: 18px;
    background: #f2d7bb;
}

.pbo-arm {
    top: 46px;
    width: 166px;
    height: 150px;
    z-index: 7;
}

.pbo-rest-sleeve,
.pbo-upper-arm-sleeve {
    stroke: #232323;
    stroke-width: 22;
}

.pbo-rest-forearm,
.pbo-lower-arm-skin {
    stroke: #d7b091;
    stroke-width: 18;
}

.pbo-shoulder-dot {
    fill: #232323;
    stroke: #232323;
    stroke-width: 2;
}

.pbo-elbow-dot {
    fill: #d7b091;
    stroke: #d7b091;
    stroke-width: 2;
}

.pbo-rest-hand,
.pbo-hand ellipse,
.pbo-hand path {
    fill: #d7b091;
    stroke: #d7b091;
    stroke-width: 2;
}

.pbo-ball-field {
    left: 50%;
    right: auto;
    bottom: 72px;
    width: min(326px, 82%);
    height: 106px;
    transform: translateX(-50%);
    border-radius: 0.42rem;
    border: 1px solid #cbd5e1;
    background: rgba(248, 250, 252, 0.62);
    box-shadow: none;
    z-index: 6;
}

.pbo-ball-field::before {
    display: none;
}

.pbo-ball {
    width: clamp(20px, 2vw, 24px);
    height: clamp(20px, 2vw, 24px);
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    box-shadow: none;
}

.pbo-ball:hover,
.pbo-ball:focus-visible {
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.24);
}

.pbo-ball.is-target {
    width: clamp(36px, 3.7vw, 46px);
    height: clamp(36px, 3.7vw, 46px);
    color: #ffffff;
    background: #c9a227;
    border-color: #c9a227;
    box-shadow: 0 12px 26px rgba(201, 162, 39, 0.2);
}

.pbo-ball-shine {
    display: none;
}

.pbo-ball-label {
    padding: 0;
    font-family: inherit;
    font-size: clamp(0.52rem, 0.9vw, 0.72rem);
    font-weight: 800;
    line-height: 1;
    text-shadow: none;
}

.pbo-ball.is-target .pbo-ball-label {
    font-size: clamp(0.72rem, 1.1vw, 0.9rem);
}

.pbo-capture-bay {
    left: 50%;
    right: auto;
    bottom: 34px;
    width: min(78%, 320px);
    min-height: auto;
    padding: 0;
    transform: translateX(-50%);
    color: #94a3b8;
    background: transparent;
    border: 0;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    justify-items: center;
    box-shadow: none;
}

.pbo-bottom-actions {
    justify-content: center;
    margin-top: 0.35rem;
}

.pbo-bottom-actions .ppb-primary-btn {
    min-width: 7.8rem;
    min-height: 2.7rem;
    border-radius: 999px;
    color: #ffffff;
    background: #232323;
    box-shadow: none;
}

.pbo-bottom-actions .ppb-soft-btn,
.pbo-bottom-actions .ppb-ghost-btn {
    min-height: 2.7rem;
    border-radius: 999px;
}

.pbo-empty {
    color: #94a3b8;
    font-size: 0.8rem;
}

.pbo-history-order {
    color: rgba(255, 244, 191, 0.8);
    font-size: 0.8rem;
    font-weight: 800;
}

@keyframes pboBallFloat {
    0%, 100% {
        transform: translate(-50%, -50%) translate3d(0, 0, 0) rotate(var(--pbo-spin));
    }
    50% {
        transform: translate(-50%, -50%) translate3d(4px, -8px, 0) rotate(calc(var(--pbo-spin) + 8deg));
    }
}

@keyframes pboBallChaos {
    0%, 100% {
        transform: translate(-50%, -50%) translate3d(-5px, 3px, 0) rotate(calc(var(--pbo-spin) - 8deg));
    }
    50% {
        transform: translate(-50%, -50%) translate3d(6px, -7px, 0) rotate(calc(var(--pbo-spin) + 12deg));
    }
}

@keyframes pboTargetPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1) rotate(var(--pbo-spin));
    }
    50% {
        transform: translate(-50%, -50%) scale(1.07) rotate(calc(var(--pbo-spin) + 6deg));
    }
}

@keyframes pboCapturePop {
    0% {
        transform: translate(-50%, -50%) scale(1.05) rotate(var(--pbo-spin));
        opacity: 1;
    }
    58% {
        transform: translate(-50%, -66%) scale(0.96) rotate(calc(var(--pbo-spin) + 8deg));
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -78%) scale(0.78) rotate(14deg);
        opacity: 0.4;
    }
}

@keyframes pboHostIdle {
    0%, 100% {
        transform: translateX(-50%) translate3d(0, 0, 0);
    }
    50% {
        transform: translateX(-50%) translate3d(0, -5px, 0);
    }
}

@keyframes pboHostReady {
    0%, 100% {
        transform: translateX(-50%) translate3d(0, 0, 0);
    }
    42% {
        transform: translateX(-50%) translate3d(0, -8px, 0);
    }
}

@keyframes pboArmIdle {
    0%, 100% {
        transform: translateX(-50%) rotate(-2deg);
    }
    50% {
        transform: translateX(-50%) rotate(4deg);
    }
}

@keyframes pboArmStir {
    0%, 100% {
        transform: translateX(-50%) translate3d(-12px, 3px, 0) rotate(-8deg);
    }
    34% {
        transform: translateX(-50%) translate3d(16px, -5px, 0) rotate(12deg);
    }
    68% {
        transform: translateX(-50%) translate3d(4px, 8px, 0) rotate(2deg);
    }
}

@keyframes pboUpperArmStir {
    0%, 100% {
        transform: translateX(-50%) rotate(14deg);
    }
    50% {
        transform: translateX(-50%) rotate(34deg);
    }
}

@keyframes pboLowerArmStir {
    0%, 100% {
        transform: translateX(-50%) rotate(-42deg);
    }
    50% {
        transform: translateX(-50%) rotate(-14deg);
    }
}

@keyframes pboHandStir {
    0%, 100% {
        transform: translateX(-50%) translate3d(-5px, 2px, 0) rotate(-16deg);
    }
    50% {
        transform: translateX(-50%) translate3d(7px, -5px, 0) rotate(18deg);
    }
}

@keyframes pboArmGrab {
    0% {
        transform: translateX(-50%) translate3d(-8px, 0, 0) rotate(-8deg);
    }
    100% {
        transform: translateX(-50%) translate3d(8px, 8px, 0) rotate(10deg);
    }
}

@keyframes pboArmSvgIdle {
    0%, 100% {
        transform: translateX(-50%) translate3d(0, 0, 0);
    }
    50% {
        transform: translateX(-50%) translate3d(0, 5px, 0);
    }
}

@keyframes pboArmSvgStirBase {
    0%, 100% {
        transform: translateX(-50%) translate3d(-8px, 4px, 0) rotate(-5deg);
    }
    35% {
        transform: translateX(-50%) translate3d(10px, -4px, 0) rotate(7deg);
    }
    70% {
        transform: translateX(-50%) translate3d(3px, 8px, 0) rotate(-1deg);
    }
}

@keyframes pboSvgUpperStir {
    0%, 100% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(20deg);
    }
}

@keyframes pboSvgLowerStir {
    0%, 100% {
        transform: rotate(28deg);
    }
    50% {
        transform: rotate(-24deg);
    }
}

@keyframes pboArmSvgGrabBase {
    from {
        transform: translateX(-50%) translate3d(-5px, 2px, 0) rotate(-3deg);
    }
    to {
        transform: translateX(-50%) translate3d(4px, 8px, 0) rotate(5deg);
    }
}

@keyframes pboSvgUpperGrab {
    from {
        transform: rotate(4deg);
    }
    to {
        transform: rotate(18deg);
    }
}

@keyframes pboSvgLowerGrab {
    from {
        transform: rotate(-12deg);
    }
    to {
        transform: rotate(-34deg);
    }
}

@keyframes pboSlotPulse {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(0, -3px, 0) scale(1.04);
    }
}

@keyframes pboSlotReveal {
    0% {
        transform: translate3d(0, 6px, 0) scale(0.88);
        opacity: 0.58;
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
    }
}

@keyframes pboCharacterFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -8px, 0);
    }
}

@keyframes pboCharacterCelebrate {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    42% {
        transform: translate3d(0, -16px, 0) scale(1.04);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes pboSpotSweep {
    0% {
        opacity: 0;
        transform: translateX(-120%);
    }
    18% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(120%);
    }
}

@media (max-width: 1180px) {
    .pbo-stage-shell {
        grid-template-columns: 1fr;
    }

    .pbo-side-panel {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 860px) {
    .pbo-character-picker {
        grid-template-columns: 1fr;
    }

    .pbo-stage-spotlight strong {
        font-size: clamp(2.3rem, 14vw, 4rem);
    }

    .pbo-arena {
        min-height: 430px;
    }

    .pbo-capture-bay {
        left: 1rem;
        right: 1rem;
        bottom: 0.85rem;
        width: auto;
    }

    .pbo-ball {
        width: 58px;
        height: 58px;
    }

    .pbo-ball.is-target {
        width: 92px;
        height: 92px;
    }
}

.pbo-capture-bay {
    left: 50%;
    right: auto;
    bottom: 34px;
    width: min(78%, 320px);
    transform: translateX(-50%);
}

.pbo-ball {
    width: clamp(20px, 2vw, 24px);
    height: clamp(20px, 2vw, 24px);
}

.pbo-ball.is-target {
    width: clamp(36px, 3.7vw, 46px);
    height: clamp(36px, 3.7vw, 46px);
}

/* Final Threads reference lock: one small host, one arm, compact box. */
.pbo-arena {
    min-height: 430px;
}

.pbo-rig {
    top: 150px;
    width: 96px;
    height: 136px;
    z-index: 7;
}

.pbo-rig::before {
    bottom: 0;
    width: 86px;
    height: 72px;
    border-radius: 24px 24px 7px 7px;
    background: #242424;
}

.pbo-character {
    width: 72px;
    height: 92px;
}

.pbo-character-face,
.pbo-character.is-female-teacher .pbo-character-face {
    top: 21px;
    width: 42px;
    height: 42px;
}

.pbo-character-hair,
.pbo-character.is-male-teacher .pbo-character-hair {
    top: 13px;
    width: 48px;
    height: 25px;
}

.pbo-character.is-female-teacher .pbo-character-hair {
    top: 10px;
    width: 54px;
    height: 58px;
}

.pbo-character-neck {
    top: 63px;
    width: 17px;
    height: 14px;
}

.pbo-arm {
    left: 50%;
    top: 54px;
    width: 142px;
    height: 112px;
    transform: translateX(-50%);
    transform-origin: 86px 36px;
    animation: pboSingleArmIdle 3.4s ease-in-out infinite;
    z-index: 8;
}

.pbo-arm-svg {
    width: 100%;
    height: 100%;
}

.pbo-upper-arm-sleeve {
    stroke: #242424;
    stroke-width: 16;
}

.pbo-lower-arm-skin {
    stroke: #d7b091;
    stroke-width: 13;
}

.pbo-shoulder-dot {
    opacity: 0;
}

.pbo-elbow-dot {
    fill: #242424;
    stroke: #242424;
    stroke-width: 1;
}

.pbo-hand ellipse,
.pbo-hand path {
    fill: #d7b091;
    stroke: #d7b091;
    stroke-width: 1.6;
}

.pbo-working-arm,
.pbo-upper-arm,
.pbo-lower-arm {
    transform-box: view-box;
}

.pbo-working-arm,
.pbo-upper-arm {
    transform-origin: 86px 36px;
}

.pbo-lower-arm {
    transform-origin: 58px 76px;
}

.pbo-rest-arm,
.pbo-rest-sleeve,
.pbo-rest-forearm,
.pbo-rest-hand {
    display: none;
}

.pbo-arena.is-aiming .pbo-arm,
.pbo-arena.is-chaos .pbo-arm {
    animation: pboSingleShoulderSlide 0.72s ease-in-out infinite;
}

.pbo-arena.is-aiming .pbo-upper-arm,
.pbo-arena.is-chaos .pbo-upper-arm {
    animation: pboSingleShoulderWiggle 0.72s ease-in-out infinite;
}

.pbo-arena.is-aiming .pbo-lower-arm,
.pbo-arena.is-chaos .pbo-lower-arm {
    animation: pboSingleElbowSpin 0.54s linear infinite;
}

.pbo-arena.is-grabbing .pbo-arm {
    animation: pboSingleArmGrabBase 0.5s ease-out both;
}

.pbo-arena.is-grabbing .pbo-upper-arm {
    animation: pboSingleUpperGrab 0.5s ease-out both;
}

.pbo-arena.is-grabbing .pbo-lower-arm {
    animation: pboSingleLowerGrab 0.5s ease-out both;
}

.pbo-ball-field {
    bottom: 88px;
    width: min(220px, 40%);
    height: 78px;
}

.pbo-ball {
    width: 18px;
    height: 18px;
}

.pbo-ball.is-target {
    width: 42px;
    height: 42px;
}

.pbo-ball-label {
    font-size: 0.52rem;
}

.pbo-ball.is-target .pbo-ball-label {
    font-size: 0.72rem;
}

.pbo-capture-bay {
    bottom: 42px;
}

@keyframes pboSingleArmIdle {
    0%, 100% {
        transform: translateX(-50%) translate3d(0, 0, 0);
    }
    50% {
        transform: translateX(-50%) translate3d(0, 2px, 0);
    }
}

@keyframes pboSingleArmBaseStir {
    0%, 100% {
        transform: translateX(-50%) translate3d(-2px, 2px, 0);
    }
    50% {
        transform: translateX(-50%) translate3d(5px, -3px, 0);
    }
}

@keyframes pboSingleUpperStir {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(-78deg);
    }
}

@keyframes pboSingleLowerStir {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(-34deg);
    }
}

@keyframes pboSingleArmGrabBase {
    from {
        transform: translateX(-50%) translate3d(0, 2px, 0);
    }
    to {
        transform: translateX(-50%) translate3d(-2px, 0, 0);
    }
}

@keyframes pboSingleUpperGrab {
    from {
        transform: rotate(-42deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes pboSingleLowerGrab {
    from {
        transform: rotate(-24deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes pboSingleShoulderSlide {
    0%, 100% {
        transform: translateX(-50%) translate3d(-13px, 1px, 0);
    }
    50% {
        transform: translateX(-50%) translate3d(13px, -2px, 0);
    }
}

@keyframes pboSingleShoulderWiggle {
    0%, 100% {
        transform: rotate(-8deg);
    }
    50% {
        transform: rotate(7deg);
    }
}

@keyframes pboSingleElbowSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Classroom-visible Threads scale: one arm clearly stirs inside the ball box. */
.pbo-rig {
    top: 106px;
    width: 150px;
    height: 208px;
}

.pbo-rig::before {
    bottom: 22px;
    width: 128px;
    height: 104px;
    border-radius: 34px 34px 10px 10px;
}

.pbo-character {
    width: 104px;
    height: 132px;
}

.pbo-character-face,
.pbo-character.is-female-teacher .pbo-character-face {
    top: 25px;
    width: 58px;
    height: 58px;
}

.pbo-character-hair,
.pbo-character.is-male-teacher .pbo-character-hair {
    top: 14px;
    width: 66px;
    height: 34px;
}

.pbo-character.is-female-teacher .pbo-character-hair {
    top: 10px;
    width: 76px;
    height: 80px;
}

.pbo-character-neck {
    top: 80px;
    width: 23px;
    height: 20px;
}

.pbo-arm {
    top: 62px;
    width: 228px;
    height: 178px;
    z-index: 10;
}

.pbo-upper-arm-sleeve {
    stroke-width: 18;
}

.pbo-lower-arm-skin {
    stroke-width: 16;
}

.pbo-ball-field {
    bottom: 74px;
    width: min(440px, 76%);
    height: 150px;
}

.pbo-ball {
    width: clamp(30px, 3.2vw, 38px);
    height: clamp(30px, 3.2vw, 38px);
}

.pbo-ball.is-target {
    width: clamp(60px, 6vw, 74px);
    height: clamp(60px, 6vw, 74px);
}

.pbo-ball-label {
    font-size: clamp(0.74rem, 1.1vw, 0.92rem);
}

.pbo-ball.is-target .pbo-ball-label {
    font-size: clamp(0.88rem, 1.25vw, 1rem);
}

.pbo-capture-bay {
    bottom: 30px;
    font-size: 0.82rem;
}

@keyframes pboSingleUpperStir {
    0%, 100% {
        transform: rotate(-18deg);
    }
    35% {
        transform: rotate(-98deg);
    }
    70% {
        transform: rotate(-48deg);
    }
}

@keyframes pboSingleLowerStir {
    0%, 100% {
        transform: rotate(6deg);
    }
    35% {
        transform: rotate(-40deg);
    }
    70% {
        transform: rotate(26deg);
    }
}

.ppb-root.ppb-reduce-motion .pbo-character,
.ppb-root.ppb-reduce-motion .pbo-arm,
.ppb-root.ppb-reduce-motion .pbo-ball {
    animation: none !important;
}

/* Draw result cleanup: each mode keeps only the picked name and one result value. */
.pbl-path-active-layer {
    pointer-events: none;
}

.pbl-path-active-segment {
    stroke: #ffe66d;
    stroke-width: 14;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter:
        drop-shadow(0 0 10px rgba(255, 230, 109, 0.96))
        drop-shadow(0 0 24px rgba(110, 231, 255, 0.5));
}

.pbl-path-runner {
    pointer-events: none;
    filter:
        drop-shadow(0 0 12px rgba(255, 230, 109, 0.92))
        drop-shadow(0 0 24px rgba(110, 231, 255, 0.58));
    animation: pblRunnerPulse 560ms ease-in-out infinite alternate;
}

.pbl-path-runner.is-arrived {
    filter:
        drop-shadow(0 0 16px rgba(134, 239, 172, 0.96))
        drop-shadow(0 0 36px rgba(255, 230, 109, 0.72));
}

.pbl-runner-trail {
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 9;
    stroke-linecap: round;
    opacity: 0.76;
}

.pbl-runner-body {
    fill: #ffe66d;
    stroke: #082f49;
    stroke-width: 3.5;
}

.pbl-runner-core {
    fill: #67e8f9;
    opacity: 0.92;
}

.pbl-runner-light {
    fill: #fff7ad;
    stroke: #ffffff;
    stroke-width: 3.2;
}

.pbl-rainbow-spark {
    pointer-events: none;
    stroke-linecap: round;
    opacity: 1;
    filter:
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.88))
        drop-shadow(0 0 18px rgba(110, 231, 255, 0.58));
    animation: pblSparkFade 960ms ease-out forwards;
}

.pbl-board-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-color: rgba(255, 212, 92, 0.58) rgba(15, 23, 42, 0.82);
    scrollbar-width: thin;
}

.pbl-board-wrap::-webkit-scrollbar {
    height: 0.78rem;
}

.pbl-board-wrap::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
}

.pbl-board-wrap::-webkit-scrollbar-thumb {
    border: 3px solid rgba(15, 23, 42, 0.82);
    border-radius: 999px;
    background: rgba(255, 212, 92, 0.7);
}

.pbl-top-row,
.pbl-bottom-row,
.pbl-svg-wrap,
.pbl-svg {
    width: var(--pbl-board-width, 100%);
    min-width: 100%;
}

.pbl-top-row,
.pbl-bottom-row {
    gap: clamp(0.45rem, 0.7vw, 0.68rem);
}

.pbl-svg-wrap {
    max-width: none;
}

.pbl-svg {
    display: block;
}

.pbl-top-row .pbl-top-node {
    min-height: 3.7rem;
    padding: 0.52rem 0.56rem;
}

.pbl-bottom-row .pbl-bottom-node {
    min-height: 3.35rem;
    padding: 0.5rem 0.56rem;
    font-size: clamp(1rem, 1.05vw, 1.24rem);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.pbl-top-row .pbl-node-index {
    display: none;
}

.pbl-top-row .pbl-node-name {
    display: block;
    width: 100%;
    color: #f8fafc;
    font-size: clamp(1.02rem, 1.18vw, 1.34rem);
    line-height: 1.08;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.pbl-top-row.is-compact .pbl-top-node,
.pbl-top-row.is-dense .pbl-top-node {
    min-height: 3.7rem;
    padding: 0.5rem 0.52rem;
    border-radius: 0.82rem;
}

.pbl-bottom-row.is-compact .pbl-bottom-node,
.pbl-bottom-row.is-dense .pbl-bottom-node {
    min-height: 3.35rem;
    padding: 0.5rem 0.52rem;
    border-radius: 0.82rem;
    font-size: clamp(1rem, 1.05vw, 1.22rem);
}

.pbl-top-row.is-compact .pbl-node-name,
.pbl-top-row.is-dense .pbl-node-name {
    font-size: clamp(1rem, 1.05vw, 1.24rem);
    line-height: 1.08;
}

.ppb-result-panel[data-result-mode] {
    width: min(760px, calc(100vw - 1.5rem));
    min-height: min(58vh, 520px);
    gap: 0.56rem;
    padding: clamp(1.35rem, 3vw, 2.25rem);
}

.ppb-result-panel[data-result-mode] .ppb-result-source,
.ppb-result-panel[data-result-mode] .ppb-result-compliment,
.ppb-result-panel[data-result-mode] .ppb-result-label,
.ppb-result-panel[data-result-mode] .ppb-result-phase,
.ppb-result-panel[data-result-mode] .ppb-result-meta,
.ppb-result-panel[data-result-mode] .ppb-result-wait {
    display: none !important;
}

.ppb-result-panel[data-result-mode] .ppb-result-name {
    order: 1;
    max-width: 10ch;
    margin: 0 0 0.42rem;
    color: #f8fafc;
    font-size: clamp(4rem, 11vw, 7.2rem);
    line-height: 0.96;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.ppb-result-panel[data-result-mode] .ppb-result-badge {
    display: inline-flex !important;
    order: 2;
    min-width: min(320px, 84vw);
    min-height: 3.35rem;
    padding: 0.55rem 1.3rem;
    border-radius: 0.75rem;
    background: rgba(255, 212, 92, 0.16);
    border: 1px solid rgba(255, 212, 92, 0.44);
    color: #fff4bf;
    font-size: clamp(1.65rem, 4vw, 2.6rem);
    font-weight: 950;
}

.ppb-result-panel[data-result-mode].is-neutral .ppb-result-badge {
    background: rgba(96, 165, 250, 0.14);
    border-color: rgba(191, 219, 254, 0.34);
    color: #dbeafe;
}

.ppb-result-panel[data-result-mode] .ppb-result-actions {
    order: 3;
    margin-top: clamp(0.65rem, 1.6vw, 1.1rem);
}

.ppb-result-panel[data-result-mode] .ppb-result-next-btn {
    min-width: min(320px, 84vw);
}

@keyframes pblRunnerPulse {
    from {
        opacity: 0.84;
        filter:
            drop-shadow(0 0 9px rgba(255, 230, 109, 0.88))
            drop-shadow(0 0 18px rgba(110, 231, 255, 0.5));
    }

    to {
        opacity: 1;
        filter:
            drop-shadow(0 0 16px rgba(255, 230, 109, 1))
            drop-shadow(0 0 30px rgba(110, 231, 255, 0.66));
    }
}

@keyframes pblSparkFade {
    0% {
        opacity: 0;
        stroke-dasharray: 0 42;
    }

    22% {
        opacity: 1;
        stroke-dasharray: 24 42;
    }

    100% {
        opacity: 0;
        stroke-dasharray: 2 42;
    }
}

@media (max-width: 860px) {
    .ppb-result-panel[data-result-mode] {
        min-height: min(56vh, 480px);
        padding: 1.15rem 0.9rem;
    }

    .ppb-result-panel[data-result-mode] .ppb-result-name {
        font-size: clamp(3.1rem, 17vw, 5.2rem);
    }

    .ppb-result-panel[data-result-mode] .ppb-result-badge {
        min-height: 3rem;
        font-size: clamp(1.35rem, 7vw, 2rem);
    }
}
