/* --- Impact panel (scores + goals HUD) ---
 * Matches mockup: ecology metrics left, goal status badges right. */

.impact-panel {
    --panel-stroke: rgba(180, 180, 190, 0.55);
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: stretch;
    gap: 0;
    min-width: min(920px, calc(100vw - 24px));
    padding: 14px 18px;
    background: rgba(18, 18, 24, 0.82);
    border: 1px solid var(--panel-stroke);
    border-radius: 12px;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 13px;
    pointer-events: none;
    z-index: 9999;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.impact-panel__section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.impact-panel__section--ecology {
    padding-right: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.impact-panel__section--goals {
    padding-left: 20px;
}

.impact-panel__row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
}

.impact-panel__label {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    white-space: nowrap;
}

.impact-panel__value {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    text-align: right;
    font-variant-numeric: tabular-nums;
    transition: transform 0.2s ease;
}

.impact-panel__badge {
    display: inline-block;
    padding: 4px 12px;
    background: #ffffff;
    color: #111111;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.impact-panel__row.is-updated .impact-panel__value,
.impact-panel__row.is-updated .impact-panel__badge {
    transform: scale(1.04);
}

.impact-panel__row.is-threshold-met .impact-panel__badge {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.impact-panel__row--transparency.is-goal-inactive {
    opacity: 0.35;
}

/* Shared panel stroke for HTML overlays */
.enter-screen__panel,
.territory-select__panel,
.territory-onboarding__panel,
.game-over__panel {
    border: 1px solid rgba(180, 180, 190, 0.55);
}

@media (max-width: 820px) {
    .impact-panel {
        flex-direction: column;
        gap: 12px;
        min-width: 0;
        width: calc(100vw - 20px);
        padding: 12px 14px;
    }

    .impact-panel__section--ecology {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        padding-bottom: 10px;
    }

    .impact-panel__section--goals {
        padding-left: 0;
    }

    .impact-panel__row {
        gap: 10px;
    }
}
