/* Shared section edges; the catalogue cards retain their existing presentation. */
.gge-challenges-preview {
    --challenge-section-space: 8rem;
    --challenge-lower-section-space: 10rem;
}
.gge-challenges-preview .gge-challenge-section-heading {
    --bs-gutter-x: 0;
    margin-inline: 0;
    margin-bottom: 16px !important;
    text-align: start;
}
.gge-challenges-preview .row.gge-challenge-section-heading {
    margin-top: var(--challenge-section-space) !important;
}
.gge-challenges-preview .gge-challenge-section-heading > .col-lg {
    padding-inline: 0;
    text-align: start;
}
#csgo500_main .gge-challenge-card-grid { display:grid; grid-template-columns:repeat(auto-fill,214px); justify-content:center; align-items:start; gap:24px; padding:0; }
#csgo500_main .gge-challenge-card-grid > .challenge { margin:0; }
.gge-challenge-intro { gap:24px; }
@media(max-width:767px) {
    .gge-challenge-intro { flex-direction:column; align-items:stretch; }
    .gge-challenge-intro > .or-race { max-width:none!important; width:100%; }
}
#csgo500_main.gge-challenges-preview .gge-community-races {
    max-width: none;
    margin: 0;
}
#csgo500_main.gge-challenges-preview .gge-community-races > .or-race { margin-bottom: 0; }
.gge-challenge-bottom { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; margin-top: var(--challenge-lower-section-space); }
.gge-challenge-bottom > section { display: flex; flex-direction: column; min-width: 0; }
.gge-challenge-bottom .gge-challenge-section-heading { margin-bottom: 32px !important; }
.gge-challenge-bottom > section > .or-race { flex: 1; }
.gge-challenge-join > .or-race { position: relative; overflow: visible; display: flex; flex-direction: column; gap: 12px; }
.gge-challenge-illustration { position: relative; isolation: isolate; flex-shrink: 0; width: min(100%, 800px); aspect-ratio: 76 / 43; margin-inline: auto; margin-top: calc(-8% - 16px); }
@media(min-width:1400px) {
    .gge-challenge-join .gge-challenge-illustration { width:748px; max-width:none; left:50%; margin-inline:0; transform:translateX(-50%); margin-top:-64px; }
    #csgo500_main.gge-challenges-preview { overflow:visible; }
}
.gge-challenge-fan-card { position: absolute; display: block; width: 28.1579%; height: auto; transform-origin: 50% 80%; user-select: none; pointer-events: none; filter: drop-shadow(0 3px 4px #0003); }
.gge-challenge-fan-parlay { left: 12.1053%; top: 11.7391%; transform: rotate(-13deg); }
.gge-challenge-fan-fist { left: 59.7368%; top: 11.7391%; transform: rotate(13deg); }
.gge-challenge-fan-strawberry { left: 35.9211%; top: 6.5217%; z-index: 1; }
/* The legacy catalogue stripes every table row, including the header row. */
.gge-challenge-top .or-race-table :is(thead, tr, th) { background: transparent; }
.gge-challenge-top .or-race-table tr { border-radius: 0; }
.gge-challenge-top .or-race-heading > p { white-space:nowrap; flex-shrink:0; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .gge-challenge-fan-card { transition: transform 550ms cubic-bezier(.22, 1, .36, 1); }
    .gge-challenge-illustration:hover .gge-challenge-fan-parlay { transform: translate(-4%, -1%) rotate(-21deg); }
    .gge-challenge-illustration:hover .gge-challenge-fan-fist { transform: translate(4%, -1%) rotate(21deg); }
    .gge-challenge-illustration:hover .gge-challenge-fan-strawberry { transform: translateY(-4%) rotate(-3deg); }
}
.gge-challenge-artwork { position: relative; }
.gge-challenge-expired .gge-challenge-deadline { color: var(--gge-ui-text-95a7ba, #95a7ba); }
.gge-challenge-expired [data-bs-id] { opacity: .45; cursor: not-allowed; }
.gge-challenge-steps { --step-gap: 96px; --step-content-height: 44px; display: flex; flex-direction:column; flex:0 0 auto; list-style: none; margin: 0; padding: 0; }
.gge-challenge-steps li { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; justify-self: start; }
.gge-challenge-steps li:not(:last-child) { flex:1; min-height:calc(var(--step-content-height) + var(--step-gap)); }
.gge-challenge-steps li:not(:last-child)::after { content: ""; position: absolute; left: 20px; right: 20px; top: calc(var(--step-content-height) + 16px); bottom:16px; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M1 1C1 50 999 50 999 99' fill='none' stroke='%23fa5f7a' stroke-opacity='.35' stroke-width='1' stroke-dasharray='4 7' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.gge-challenge-steps li:nth-child(2) { justify-self: end; flex-direction: row-reverse; text-align: end; }
.gge-challenge-steps li:nth-child(2)::after { transform: scaleX(-1); }
.gge-challenge-steps li > div { min-width: 0; max-width: 378px; }
.gge-challenge-steps .community-race-tab-icon { width: 40px; height: 40px; font-size: 18px; color: #fa5f7a; background: #fa5f7a12; }
.gge-challenge-steps strong { display: block; margin-block: 1px 4px; font-size: 14px; line-height: 1.4; }
.gge-challenge-steps p { margin: 0; color: var(--gge-ui-text-a8aec0, #a8aec0); font-size: 12px; line-height: 1.65; }
.gge-challenge-rules { margin: 0; }
.gge-challenge-rules summary > span { font-size: 10px; font-weight: 400; color: var(--gge-ui-text-929bb2, #929bb2); margin-left: 4px; }
.gge-challenge-rules strong { font-weight: 700; color: var(--gge-ui-text-dce2f1, #dce2f1); }
.gge-challenge-rules .gge-challenge-rule-accent { color: #fa5f7a; }
@media (max-width: 1399px) {
    .gge-challenge-bottom { grid-template-columns: 1fr; gap: 80px; }
}
@media (min-width: 641px) and (max-width: 1100px) {
    .gge-challenge-join .gge-challenge-section-heading { position:relative; top:-24px; }
}
@media (max-width: 640px) {
    .gge-challenges-preview { --challenge-section-space: 6rem; --challenge-lower-section-space: 8rem; }
    .gge-challenge-illustration { margin-top: calc(-7% - 16px); }
    .gge-challenge-steps { --step-gap: 72px; --step-content-height:64px; }
}
.gge-challenges-preview { overflow-x:clip; }
@media(max-width:640px) {
    .gge-challenge-page-heading .headerText { font-size:28px; }
}
/* Native catalogue actions fill the same space as the original block controls. */
#csgo500_main .challenge > :is(.hacksaw-button, .parlay-button) { width:calc(100% - 50px); }
#gge-case-battles #gcc-claim-dialog { inset:0; margin:auto; width:min(560px,calc(100% - 32px)); max-height:calc(100dvh - 32px); height:fit-content; }
#gcc-claim-dialog .modal-body { display:grid; gap:18px; }
#gcc-claim-dialog .gcc-field p { font-size:11px; line-height:1.8; margin-top:8px; }
#gcc-claim-call { display:grid; gap:18px; }
#gcc-claim-call[hidden], #gcc-claim-other[hidden] { display:none!important; }
#gcc-claim-dialog input,#gcc-claim-dialog textarea,#gcc-claim-dialog select { width:100%; }
