.upv2-page #upv2-meta-container:has(.upv2-goals) {
    flex: 1 1 300px;
    align-self: stretch;
    align-items: stretch;
    height: auto;
    min-height: 0;
}

.upv2-page .upv2-goals {
    --goal-accent: var(--upv2-goal-accent, var(--upv2-card, var(--mf-primary)));
    --goal-accent-soft: color-mix(in srgb, var(--goal-text) 6%, transparent);
    --goal-text: var(--upv2-goal-text, var(--upv2-text, var(--mf-public-panel-foreground)));
    --goal-muted: var(--upv2-goal-muted, var(--upv2-muted, var(--mf-public-panel-muted-foreground)));
    --goal-border: color-mix(in srgb, var(--goal-text) 12%, transparent);
    --goal-surface: color-mix(in srgb, var(--upv2-goal-bg, var(--mf-public-panel-surface)) calc(var(--upv2-goal-opacity, 1) * 100%), transparent);
    --goal-inner: color-mix(in srgb, var(--upv2-goal-inner, var(--mf-public-panel-input)) calc(var(--upv2-goal-opacity, 1) * 100%), transparent);
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--goal-border);
    border-radius: 22px;
    background: var(--goal-surface);
    box-shadow: var(--mf-shadow-panel);
    color: var(--goal-text);
    text-align: left;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.upv2-goals [hidden] { display: none !important; }

.upv2-goals .upv2-goals-header,
.upv2-goals .upv2-goals-heading,
.upv2-goals .upv2-goals-arrows,
.upv2-goals .upv2-goals-progress-row {
    display: flex;
    align-items: center;
}

.upv2-goals .upv2-goals-header { justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.upv2-goals .upv2-goals-heading { flex: 1; min-width: 0; gap: 9px; }
.upv2-goals .upv2-goals-heading > div { min-width: 0; }
.upv2-goals .upv2-goals-heading-icon {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    background: var(--goal-accent-soft);
    border: 1px solid var(--goal-border);
    border-radius: 12px;
    color: color-mix(in srgb, var(--goal-accent) 50%, var(--goal-text));
    font-size: 15px;
}
.upv2-goals .upv2-goals-heading h3 { margin: 0; color: var(--goal-text); font-size: .9rem; font-weight: 700; line-height: 1.3; }
.upv2-goals .upv2-goals-heading p { margin: 4px 0 0; color: var(--goal-muted); font-size: .65rem; line-height: 1.5; overflow-wrap: anywhere; }
.upv2-goals .upv2-goals-arrows { flex-shrink: 0; gap: 2px; margin-left: auto; }
.upv2-goals button {
    appearance: none;
    margin: 0;
    font: inherit;
    color: var(--goal-text);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.upv2-goals .upv2-goals-arrow,
.upv2-goals .upv2-goals-pause {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    font-size: 10px;
    transition: background .18s ease, border-color .18s ease;
}
.upv2-goals .upv2-goals-arrow:hover,
.upv2-goals .upv2-goals-pause:hover {
    background: var(--goal-accent-soft);
    border-color: color-mix(in srgb, var(--goal-accent) 65%, var(--goal-border));
}
.upv2-goals:focus-visible,
.upv2-goals button:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--goal-accent) 60%, var(--goal-text));
    outline-offset: 3px;
}
.upv2-goals .upv2-goals-slides { min-width: 0; }
.upv2-goals .upv2-goals-slide {
    display: none;
    flex-direction: column;
    min-width: 0;
}
.upv2-goals .upv2-goals-slide.is-active {
    display: flex;
    animation: upv2GoalSlideIn .22s ease;
}
.upv2-goals .upv2-goals-summary {
    padding: 12px;
    border: 1px solid var(--goal-border);
    border-radius: 14px;
    background: var(--goal-inner);
}
.upv2-goals .upv2-goals-kind {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 10px;
    color: var(--goal-muted);
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.upv2-goals .upv2-goals-progress-row { gap: 14px; }
.upv2-goals .upv2-goals-ring { position: relative; flex: 0 0 76px; width: 76px; height: 76px; }
.upv2-goals .upv2-goals-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.upv2-goals .upv2-goals-ring circle { fill: none; stroke-width: 6; }
.upv2-goals .upv2-goals-ring-track { stroke: color-mix(in srgb, var(--goal-text) 9%, transparent); }
.upv2-goals .upv2-goals-ring-value { stroke: color-mix(in srgb, var(--goal-accent) 70%, var(--goal-text)); stroke-linecap: round; }
.upv2-goals .upv2-goals-ring > span:not(.upv2-goals-complete-icon) {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}
.upv2-goals .upv2-goals-ring small { margin: 3px 0 0 1px; font-size: .7rem; font-weight: 500; color: var(--goal-muted); }
.upv2-goals .upv2-goals-complete-icon {
    position: absolute;
    right: 0;
    bottom: 0;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: var(--mf-primary-foreground);
    background: var(--mf-success);
    border: 3px solid var(--goal-surface);
    font-size: 9px;
}
.upv2-goals .upv2-goals-info { min-width: 0; flex: 1; }
.upv2-goals .upv2-goals-info h4 { margin: 0 0 9px; color: var(--goal-text); font-size: .82rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.upv2-goals .upv2-goals-amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; font-variant-numeric: tabular-nums; }
.upv2-goals .upv2-goals-amount strong { color: var(--goal-text); font-size: 1.1rem; font-weight: 700; letter-spacing: -.035em; overflow-wrap: anywhere; }
.upv2-goals .upv2-goals-amount > span { color: var(--goal-muted); font-size: .7rem; overflow-wrap: anywhere; }
.upv2-goals .upv2-goals-remaining { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--goal-border); color: var(--goal-muted); font-size: .65rem; line-height: 1.5; }
.upv2-goals .upv2-goals-remaining strong { color: var(--goal-text); font-weight: 500; }
.upv2-goals .upv2-goals-remaining.is-complete { display: flex; align-items: center; gap: 6px; color: var(--upv2-accent-3, var(--mf-success)); }
.upv2-goals .upv2-goals-supporters { padding: 12px 2px 0; }
.upv2-goals .upv2-goals-supporters h5 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; color: var(--goal-text); font-size: .7rem; font-weight: 600; }
.upv2-goals .upv2-goals-supporters h5 i { color: var(--goal-muted); font-size: .8rem; }
.upv2-goals .upv2-goals-donors { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.upv2-goals .upv2-goals-donors li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; color: var(--goal-text); font-size: .68rem; }
.upv2-goals .upv2-goals-donors li + li { border-top: 1px solid var(--goal-border); }
.upv2-goals .upv2-goals-donor-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upv2-goals .upv2-goals-donor-name > span { color: var(--goal-muted); margin-right: 2px; }
.upv2-goals .upv2-goals-donors strong { flex-shrink: 0; max-width: 55%; overflow-wrap: anywhere; font-size: .68rem; font-weight: 500; }
.upv2-goals .upv2-goals-empty { margin: 0; padding: 2px 0; color: var(--goal-muted); font-size: .7rem; line-height: 1.6; }
.upv2-goals .upv2-goals-counter { padding: 0 3px; color: var(--goal-muted); font-size: .65rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.upv2-goals .upv2-goals-counter [data-goal-position] { color: var(--goal-text); font-weight: 600; }
.upv2-goals .upv2-goals-pause { font-size: 9px; }
.upv2-goals .upv2-goals-dots { display: flex; flex-wrap: nowrap; max-width: 60px; overflow-x: auto; scrollbar-width: none; }
.upv2-goals .upv2-goals-dots::-webkit-scrollbar { display: none; }
.upv2-goals .upv2-goals-dot { display: grid; place-items: center; flex: 0 0 12px; width: 12px; height: 24px; padding: 0; border: 0; background: transparent; }
.upv2-goals .upv2-goals-dot span { width: 3px; height: 3px; border-radius: 9px; background: color-mix(in srgb, var(--goal-text) 30%, transparent); }
.upv2-goals .upv2-goals-dot.is-active span { width: 8px; background: var(--goal-accent); }
.upv2-goals .upv2-goals-dot:focus-visible { outline-offset: -2px; }
.upv2-goals .upv2-goals-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes upv2GoalSlideIn {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 992px) {
    .upv2-page #upv2-meta-container:has(.upv2-goals) { flex: 0 0 auto; align-self: stretch; width: 100%; max-width: 100%; }
}

@media (max-width: 400px) {
    .upv2-page .upv2-goals { padding: 14px; border-radius: 19px; }
    .upv2-goals .upv2-goals-heading-icon { display: none; }
    .upv2-goals .upv2-goals-progress-row { gap: 10px; }
    .upv2-goals .upv2-goals-ring { flex-basis: 68px; width: 68px; height: 68px; }
    .upv2-goals .upv2-goals-summary { padding: 12px; }
    .upv2-goals .upv2-goals-amount strong { font-size: 1rem; }
    .upv2-goals .upv2-goals-arrow, .upv2-goals .upv2-goals-pause { width: 28px; height: 28px; }
    .upv2-goals .upv2-goals-dot { height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    .upv2-goals .upv2-goals-slide { animation: none; transform: none; }
    .upv2-goals button { transition: none; }
}
