/* Events / competitions calendar — builds on site.css design tokens. */

.cal-page { padding-top: 96px; }

.cal-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto clamp(24px, 4vw, 40px);
    padding: 0 12px;
}
.cal-head h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.25rem);
    line-height: 1.05;
    margin: 8px 0 12px;
}
.cal-head p { color: var(--text-dim); font-size: clamp(1rem, 2.5vw, 1.15rem); }

/* ---- Controls bar ---- */
.cal-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.cal-monthnav { display: flex; align-items: center; gap: 6px; }
.cal-monthnav .cal-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 180px;
    text-align: center;
    text-transform: capitalize;
}
.cal-iconbtn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong);
    background: var(--bg-elev);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}
.cal-iconbtn:hover { background: var(--bg-elev-2); border-color: var(--secondary); }
.cal-iconbtn svg { width: 20px; height: 20px; }

.cal-toggle { display: inline-flex; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 4px; }
.cal-toggle button {
    border: 0; background: transparent; color: var(--text-dim);
    font: inherit; font-weight: 600; font-size: .9rem;
    padding: 8px 16px; border-radius: var(--radius-pill); cursor: pointer;
    transition: var(--transition);
}
.cal-toggle button.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-glow); }

/* ---- Filters ---- */
.cal-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 24px; }
.cal-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Location combobox */
.cal-loc { position: relative; flex: 1 1 260px; min-width: 210px; max-width: 360px; }
.cal-loc > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--secondary); pointer-events: none; }
.cal-loc input {
    width: 100%; background: var(--bg-elev); border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill); color: var(--text); padding: 11px 40px 11px 42px; font: inherit;
}
.cal-loc input::placeholder { color: var(--text-faint); }
.cal-loc input:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(172,159,255,.12); }
.cal-loc-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--text-faint); cursor: pointer; font-size: 1.25rem; line-height: 1; display: grid; place-items: center; }
.cal-loc-clear:hover { background: var(--bg-elev-2); color: var(--text); }
.cal-loc-menu {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
    background: var(--bg-elev); border: 1px solid var(--border-strong);
    border-radius: var(--radius-md); box-shadow: var(--shadow-md);
    max-height: 300px; overflow-y: auto; padding: 6px;
}
.cal-loc-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.cal-loc-item:hover { background: var(--bg-elev-2); }
.cal-loc-item svg { width: 15px; height: 15px; color: var(--secondary); flex: none; }
.cal-loc-item .c { flex: 1; font-weight: 600; }
.cal-loc-item .co { color: var(--text-faint); font-size: .8rem; font-weight: 400; }
.cal-loc-item .n { color: var(--secondary); font-size: .78rem; font-weight: 700; }
.cal-loc-empty { padding: 14px; color: var(--text-faint); font-size: .85rem; text-align: center; }
.cal-chip {
    border: 1px solid var(--border-strong); background: transparent;
    color: var(--text-dim); font: inherit; font-size: .85rem; font-weight: 600;
    padding: 8px 14px; border-radius: var(--radius-pill); cursor: pointer;
    transition: var(--transition); white-space: nowrap;
}
.cal-chip:hover { border-color: var(--secondary); color: var(--text); }
.cal-chip.active { background: var(--secondary); border-color: var(--secondary); color: #1a1f3a; }

/* ---- Month grid ---- */
.cal-grid-wrap { overflow-x: auto; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; min-width: 640px; }
.cal-weekdays { margin-bottom: 8px; }
.cal-weekdays span {
    text-align: center; font-size: .78rem; font-weight: 700;
    color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em;
}
.cal-cell {
    min-height: 116px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px;
    display: flex; flex-direction: column; gap: 5px;
    transition: var(--transition);
}
.cal-cell.other { opacity: .4; }
.cal-cell.today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary-glow) inset; }
.cal-cell.has-events { cursor: pointer; }
.cal-cell.has-events:hover { border-color: var(--secondary); transform: translateY(-2px); }
.cal-cell.selected { border-color: var(--secondary); background: var(--bg-elev-2); }
.cal-daynum { font-size: .85rem; font-weight: 700; color: var(--text-dim); }
.cal-cell.today .cal-daynum {
    color: #fff; background: var(--primary); width: 24px; height: 24px;
    border-radius: 50%; display: grid; place-items: center;
}
.cal-pill {
    font-size: .72rem; font-weight: 600; line-height: 1.2;
    padding: 3px 7px; border-radius: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    border-left: 3px solid var(--secondary);
    background: rgba(172, 159, 255, 0.14); color: var(--text);
    cursor: pointer;
}
.cal-pill.st-live { border-left-color: var(--success); background: rgba(93, 211, 158, 0.15); }
.cal-pill.st-finished { border-left-color: var(--text-faint); background: rgba(255,255,255,0.06); color: var(--text-dim); }
.cal-more { font-size: .7rem; color: var(--secondary); font-weight: 700; }

/* ---- Agenda / list ---- */
.cal-agenda { display: flex; flex-direction: column; gap: 28px; }
.cal-daygroup h3 {
    font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
    color: var(--secondary); margin-bottom: 12px; text-transform: capitalize;
    display: flex; align-items: baseline; gap: 8px;
}
.cal-daygroup h3 .cal-dow { color: var(--text-faint); font-size: .8rem; font-weight: 600; }

.ev-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.ev-card {
    position: relative;
    display: flex; flex-direction: column;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}
.ev-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
/* Fixed 16:9 frame; the picture fills one axis exactly and the leftover strip
   keeps the card's own colour, so nothing is cropped and the frame never reads
   as a badly-cut photo. */
.ev-cover {
    position: relative; aspect-ratio: 16 / 9;
    background: var(--bg-elev);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    padding: 8px;
}
.ev-cover img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.ev-cover .ev-logo { width: 56px; height: 56px; border-radius: var(--radius-md); object-fit: cover; box-shadow: var(--shadow-sm); }
.ev-datechip {
    position: absolute; top: 10px; left: 10px;
    background: rgba(26,31,58,.85); backdrop-filter: blur(6px);
    border-radius: var(--radius-sm); padding: 5px 9px; text-align: center;
    border: 1px solid var(--border-strong);
}
.ev-datechip .d { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; line-height: 1; }
.ev-datechip .m { font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.ev-statusdot {
    position: absolute; top: 10px; right: 10px;
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: 4px 9px; border-radius: var(--radius-pill);
    background: rgba(172,159,255,.9); color: #1a1f3a;
}
.ev-statusdot.st-live { background: var(--success); }
.ev-statusdot.st-finished { background: rgba(255,255,255,.55); color: #1a1f3a; }

.ev-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ev-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; line-height: 1.15; }
.ev-cardesc {
    color: var(--text-dim); font-size: .87rem; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ev-meta { display: flex; flex-direction: column; gap: 5px; color: var(--text-dim); font-size: .85rem; }
.ev-meta .row { display: flex; align-items: center; gap: 7px; }
.ev-meta svg { width: 15px; height: 15px; flex: none; color: var(--secondary); }
.ev-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ev-badge {
    font-size: .72rem; font-weight: 700; padding: 4px 9px; border-radius: var(--radius-pill);
    background: rgba(231,134,106,.16); color: var(--primary); border: 1px solid rgba(231,134,106,.3);
}
.ev-badge.alt { background: rgba(172,159,255,.14); color: var(--secondary); border-color: rgba(172,159,255,.3); }
.ev-cta { margin-top: auto; padding-top: 6px; }

/* ---- Empty / loading ---- */
.cal-empty, .cal-loading {
    text-align: center; padding: 64px 24px; color: var(--text-dim);
    background: var(--bg-elev); border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
}
.cal-empty svg { width: 48px; height: 48px; color: var(--text-faint); margin-bottom: 12px; }
.cal-empty h3 { font-family: var(--font-display); color: var(--text); margin-bottom: 6px; }

/* ---- Detail modal ---- */
.ev-modal-backdrop {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(10, 13, 28, .7); backdrop-filter: blur(4px);
    display: grid; place-items: center; padding: 16px;
    opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.ev-modal-backdrop.open { opacity: 1; pointer-events: auto; }
.ev-modal {
    width: min(560px, 100%); max-height: 88vh; overflow-y: auto;
    background: var(--bg); border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
    transform: translateY(12px) scale(.98); transition: transform var(--transition);
}
.ev-modal-backdrop.open .ev-modal { transform: none; }
/* Organisers upload anything from a wide banner to a tall square logo.
   `contain` keeps the whole image visible (never cropped) and the letter-
   boxing takes the popup's own background, so it reads as one surface. */
/* Organisers upload anything from a wide banner to a tall square logo.
   The image is scaled DOWN to fit (never cropped) and the leftover space
   takes the popup's own background, so it reads as one surface.
   NOTE: a percentage max-height is ignored on a centred grid item —
   flexbox + an explicit px cap (box height minus padding) is reliable. */
.ev-modal-cover { height: 170px; position: relative; background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    padding: 12px; overflow: hidden; }
.ev-modal-cover img { max-width: 100%; max-height: 146px; width: auto; height: auto;
    object-fit: contain; }
.ev-modal-cover .ev-logo { width: 72px; height: 72px; border-radius: var(--radius-md); }
.ev-modal-close {
    position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
    border-radius: 50%; border: 0; background: rgba(26,31,58,.85); color: #fff;
    cursor: pointer; display: grid; place-items: center;
}
.ev-modal-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.ev-modal-body h2 { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.ev-modal-desc { color: var(--text-dim); font-size: .95rem; line-height: 1.55; white-space: pre-wrap; }
.ev-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.ev-info { display: flex; flex-direction: column; gap: 2px; }
.ev-info .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.ev-info .v { font-weight: 600; }
.ev-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.ev-modal-actions .btn { flex: 1 1 160px; }

/* ---- Registration inside the modal ---- */
.ev-free { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: .8rem; font-weight: 700; color: var(--success); background: rgba(93,211,158,.12); border: 1px solid rgba(93,211,158,.3); padding: 4px 10px; border-radius: var(--radius-pill); }
.ev-myregs { display: flex; flex-direction: column; gap: 8px; }
.ev-myreg { display: flex; align-items: center; gap: 10px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; }
.ev-myreg .nm { font-weight: 600; flex: 1; }
.ev-myreg .st { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 3px 8px; border-radius: var(--radius-pill); background: rgba(93,211,158,.15); color: var(--success); }
.ev-myreg .st.wait { background: rgba(231,134,106,.15); color: var(--primary); }
.ev-myreg .wd { border: 0; background: transparent; color: var(--text-faint); cursor: pointer; font: inherit; font-size: .82rem; text-decoration: underline; }
.ev-myreg .wd:hover { color: var(--error); }
.ev-secttl { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); font-weight: 700; }

.ev-form { display: flex; flex-direction: column; gap: 14px; }
.ev-field { display: flex; flex-direction: column; gap: 6px; }
.ev-field label { font-size: .82rem; color: var(--text-dim); font-weight: 600; }
.ev-field input, .ev-field select {
    width: 100%; background: var(--bg-elev); border: 1px solid var(--border-strong);
    border-radius: var(--radius-md); color: var(--text); padding: 11px 14px; font: inherit;
}
.ev-field input:focus, .ev-field select:focus { outline: none; border-color: var(--secondary); }
.ev-field select option { background: var(--bg-elev); color: var(--text); }
.ev-check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text-dim); cursor: pointer; }
.ev-check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--primary); }
.ev-waiver { max-height: 150px; overflow-y: auto; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; font-size: .85rem; color: var(--text-dim); line-height: 1.5; white-space: pre-wrap; }
.ev-formerr { color: var(--error); font-size: .85rem; }
.ev-formok { color: var(--success); font-size: .95rem; font-weight: 600; text-align: center; padding: 8px 0; }
.ev-cat-hint { font-size: .78rem; color: var(--text-faint); }

@media (max-width: 560px) {
    .ev-info-grid { grid-template-columns: 1fr; }
    .cal-title { min-width: 130px !important; font-size: 1.05rem !important; }
    .cal-cell { min-height: 92px; }
}

/* Date block: "From" / "To" stacked, label muted and small so the
   actual date stays the thing you read first. */
.ev-when-row { display: block; }
.ev-when-row em { display: inline-block; min-width: 26px; margin-right: 6px;
    font-style: normal; font-size: .75rem; font-weight: 600;
    color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.ev-info .v { line-height: 1.5; }

/* ---------- Full competition page (event.html) ---------- */
.evp { padding-bottom: 130px; }
.evp-hero { padding-top: 84px; }
/* Cover: one axis flush with the frame, the rest is page background - so an
   image of any shape looks deliberate rather than cropped. */
.evp-cover {
    width: var(--container); margin: 0 auto;
    aspect-ratio: 16 / 9; max-height: 52vh;
    display: flex; align-items: center; justify-content: center;
    background: transparent; overflow: hidden;
}
.evp-cover img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--radius-lg); }
.evp-cover .ev-logo { width: 120px; height: 120px; }
.evp-head { width: var(--container); margin: 18px auto 0; }
.evp-topline { display: flex; align-items: center; gap: 12px; }
.evp-back { color: var(--text-dim); font-size: .9rem; font-weight: 600; }
.evp-back:hover { color: var(--primary); }
.evp-head .ev-statusdot { position: static; display: inline-block; }
.evp-titlerow { display: flex; align-items: flex-start; gap: 16px; margin: 10px 0 20px; }
.evp-titlerow h1 { flex: 1; font-size: clamp(1.75rem, 4vw, 2.7rem); line-height: 1.08; }

/* One modern share control, right of the title. */
.evp-shareone { display: flex; align-items: center; gap: 10px; flex: none; padding-top: 6px; }
.evp-sharebtn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: var(--radius-pill);
    background: rgba(172,159,255,.12); border: 1px solid var(--border-strong);
    color: var(--text); font-weight: 600; font-size: .88rem; cursor: pointer;
    transition: var(--transition);
}
.evp-sharebtn:hover { background: rgba(172,159,255,.22); transform: translateY(-1px); }
.evp-sharebtn svg { width: 16px; height: 16px; }
.evp-copied { color: var(--success); font-size: .85rem; font-weight: 600; white-space: nowrap; }

.evp-map {
    display: inline-flex; align-items: center; gap: 5px; margin-left: 10px;
    color: var(--secondary); font-weight: 600; font-size: .85rem; white-space: nowrap;
}
.evp-map svg { width: 14px; height: 14px; }
.evp-map:hover { color: var(--primary); text-decoration: underline; }

.evp-body { margin-top: 30px; display: flex; flex-direction: column; gap: 12px; }

/* ---- collapsible sections (mirror the app's expandable blocks) ---- */
.evp-acc {
    background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.evp-acc > summary {
    display: flex; align-items: center; gap: 12px; cursor: pointer;
    padding: 16px 18px; list-style: none; user-select: none;
}
.evp-acc > summary::-webkit-details-marker { display: none; }
.evp-acc > summary:hover { background: rgba(172,159,255,.06); }
.evp-acc > summary h3 { flex: 1; font-size: 1.08rem; font-weight: 700; margin: 0; }
.evp-acc > summary .ic { display: flex; color: var(--primary); }
.evp-acc > summary .ic svg { width: 20px; height: 20px; }
.evp-acc > summary .chev { width: 18px; height: 18px; color: var(--text-faint); transition: transform .2s ease; }
.evp-acc[open] > summary .chev { transform: rotate(180deg); }
.evp-acc[open] > summary { border-bottom: 1px solid var(--border); }
.evp-accbody { padding: 18px; }

/* ---- description / markdown ---- */
.evp-desc { color: var(--text-dim); white-space: pre-wrap; line-height: 1.65; }
.evp-md { color: var(--text-dim); line-height: 1.7; }
.evp-md h3, .evp-md h4, .evp-md h5, .evp-md h6 { color: var(--text); margin: 16px 0 8px; font-size: 1.02rem; }
.evp-md p { margin: 0 0 10px; }
.evp-md ul, .evp-md ol { margin: 0 0 10px 20px; }
.evp-md li { margin-bottom: 4px; }
.evp-md a { color: var(--secondary); text-decoration: underline; }
.evp-md img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 8px 0; }
.evp-md code { background: rgba(0,0,0,.25); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.evp-muted { color: var(--text-faint); font-size: .92rem; }
.evp-pre {
    white-space: pre-wrap; font: inherit; font-size: .9rem; color: var(--text-dim);
    background: rgba(0,0,0,.18); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 16px; max-height: 420px; overflow-y: auto;
}

/* ---- categories ---- */
.evp-tile {
    background: rgba(231,134,106,.06); border: 1px solid rgba(231,134,106,.2);
    border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px;
}
.evp-tile:last-child { margin-bottom: 0; }
.evp-tile .hd { font-weight: 800; font-size: 1rem; color: var(--primary); }
.evp-tile .sub { color: var(--text-faint); font-size: .85rem; margin-top: 3px; }
/* Live capacity chip on a category tile: red "waitlist" when full, amber
   "spots left" when nearly full. */
.evp-cap { display: inline-block; margin-left: 8px; padding: 2px 9px;
    border-radius: 999px; font-size: .72rem; font-weight: 700;
    vertical-align: middle; white-space: nowrap; }
.evp-cap.full { background: rgba(224,86,86,.16); color: #e05656; }
.evp-cap.left { background: rgba(230,170,60,.16); color: #e0a83c; }
/* Live headcount line under a category name: "Registered: X / limit". */
.evp-catcnt { display: flex; align-items: center; gap: 6px; margin-top: 6px;
    font-size: .85rem; font-weight: 600; color: var(--text-faint); }
.evp-catcnt svg { flex: none; opacity: .85; }
.evp-catcnt.full { color: #e05656; }
.evp-rounds { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(231,134,106,.18); }
.evp-rounds .lbl {
    display: block; font-size: .7rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-faint); margin-bottom: 4px;
}
.evp-rounds .r { font-size: .85rem; color: var(--text-dim); margin-top: 3px; }
.evp-rounds .r span { color: var(--text-faint); }

/* ---- prizes ---- */
.evp-prizegroup + .evp-prizegroup { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.evp-prizegroup .gh { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 10px; }
.evp-prizegroup .gh .cnt {
    background: rgba(231,134,106,.16); color: var(--primary); border-radius: var(--radius-pill);
    padding: 1px 9px; font-size: .78rem;
}
.evp-prize {
    display: flex; gap: 12px; align-items: flex-start; padding: 10px 0;
    border-bottom: 1px solid rgba(172,159,255,.08);
}
.evp-prize:last-child { border-bottom: 0; }
.evp-prize .ph {
    width: 48px; height: 48px; flex: none; border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: rgba(172,159,255,.14); font-weight: 800; font-size: 1.05rem;
}
.evp-prize .ph img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); }
.evp-prize .ph.r1 { background: rgba(255,215,0,.18); color: #FFD700; }
.evp-prize .ph.r2 { background: rgba(192,192,192,.18); color: #C0C0C0; }
.evp-prize .ph.r3 { background: rgba(205,127,50,.2); color: #CD7F32; }
.evp-prize .tx { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.evp-prize .tx strong { font-size: .97rem; }
.evp-prize .bd { display: flex; flex-wrap: wrap; gap: 6px; }
.evp-prize .b {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill);
    background: rgba(172,159,255,.14); color: var(--secondary);
}
.evp-prize .b img { width: 16px; height: 16px; object-fit: contain; border-radius: 3px; background: #fff; }
.evp-prize .b.rank.r1 { background: rgba(255,215,0,.16); color: #FFD700; }
.evp-prize .b.rank.r2 { background: rgba(192,192,192,.16); color: #C0C0C0; }
.evp-prize .b.rank.r3 { background: rgba(205,127,50,.18); color: #CD7F32; }
.evp-prize .ds { color: var(--text-faint); font-size: .85rem; }
.evp-prize .wn { color: var(--primary); font-size: .85rem; font-weight: 600; }
.evp-prize .lk { color: var(--secondary); font-size: .9rem; }

/* ---- pricing ---- */
.evp-sublbl {
    font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    color: var(--text-faint); margin-bottom: 7px;
}
.evp-price {
    background: rgba(231,134,106,.06); border: 1px solid rgba(231,134,106,.18);
    border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 8px;
    display: flex; gap: 12px; align-items: flex-start;
}
.evp-price .thumb { width: 46px; height: 46px; flex: none; object-fit: contain; background: var(--bg-elev-2); border-radius: var(--radius-sm); padding: 3px; }
.evp-price .hd { flex: 1; display: flex; align-items: baseline; gap: 12px; }
.evp-price .hd > span { flex: 1; font-weight: 700; font-size: .97rem; display: flex; flex-direction: column; gap: 2px; }
.evp-price .hd i { font-style: normal; font-weight: 400; font-size: .8rem; color: var(--text-faint); }
.evp-price .hd b { color: var(--primary); font-size: 1.02rem; white-space: nowrap; }
.evp-price .tier {
    display: flex; align-items: baseline; gap: 10px; margin-top: 5px;
    font-size: .82rem; color: var(--text-faint);
}
.evp-price .tier b { margin-left: auto; font-weight: 700; }
.evp-price .tier.on { color: var(--primary); font-weight: 600; }
.evp-price:has(.tier) { flex-direction: column; }
.evp-price:has(.tier) .hd { width: 100%; }
.evp-free { color: var(--success); font-weight: 700; }
.evp-facts { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.evp-facts li { color: var(--text-faint); font-size: .84rem; }
.evp-facts li::before { content: '\00b7 '; }

/* ---- sponsors (mirrors the app's SponsorStrip) ---- */
.evp-sponsors {
    display: grid; gap: 12px; margin-top: 14px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.evp-sponsor {
    position: relative;
    display: block; padding: 16px; text-align: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(172,159,255,.2), rgba(172,159,255,.06));
    border: 1.5px solid rgba(172,159,255,.5);
    color: var(--text); transition: var(--transition);
}
.evp-sponsor.headline {
    background: linear-gradient(135deg, rgba(231,134,106,.2), rgba(231,134,106,.06));
    border-color: rgba(231,134,106,.5);
}
a.evp-sponsor:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.evp-sponsor .badge {
    display: inline-flex; align-items: center; gap: 5px; margin-bottom: 12px;
    font-size: .69rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
    color: var(--primary);
}
.evp-sponsor .badge svg { width: 14px; height: 14px; }
/* Just the logo — no forced white panel. Transparent artwork keeps its own
   look; empty space around it simply shows the card through. A little larger
   now that there's no frame boxing it in. */
.evp-sponsor .logo {
    display: flex; align-items: center; justify-content: center;
    height: 104px;
}
.evp-sponsor.headline .logo { height: 150px; }
.evp-sponsor .logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.evp-sponsor .logo .fb { color: var(--text-dim); font-weight: 800; font-size: .95rem; }
.evp-sponsor .nm { margin-top: 12px; font-weight: 800; font-size: .95rem; }
.evp-sponsor.headline .nm { font-size: 1.18rem; }
.evp-sponsor .ds { margin-top: 6px; color: var(--text-dim); font-size: .82rem; line-height: 1.5; }
.evp-sponsor.headline .ds { font-size: .88rem; }
/* External-link cue: a small ↗ icon in the top-right corner instead of a full
   "Visit site" button — the whole card is already the link. On touch it stays
   subtly visible; on hover-capable devices it reveals as the card is hovered. */
.evp-sponsor .visit {
    position: absolute; top: 12px; right: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    color: var(--secondary);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    opacity: .5;
    transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.evp-sponsor.headline .visit { color: var(--primary); }
.evp-sponsor .visit svg { width: 15px; height: 15px; }
@media (hover: hover) {
    .evp-sponsor .visit { opacity: 0; transform: translateY(-3px); }
    a.evp-sponsor:hover .visit {
        opacity: 1; transform: translateY(0); background: rgba(255,255,255,.13);
    }
}

/* ---- floating sign-up ---- */
.evp-fab {
    position: fixed; right: 24px; bottom: 24px; left: auto; z-index: 90;
    display: flex; justify-content: flex-end; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
.evp-fab .btn {
    pointer-events: auto; box-shadow: var(--shadow-lg);
    border-radius: var(--radius-pill); padding: 15px 30px; font-size: 1rem;
}
.evp-fab .btn:disabled { opacity: .55; cursor: default; box-shadow: none; }
/* Out of the way once the sign-up form itself is on screen. */
.evp-fab.away { opacity: 0; transform: translateY(20px); pointer-events: none; }

@media (max-width: 760px) {
    .evp-hero { padding-top: 72px; }
    .evp-cover { width: 100%; aspect-ratio: 4 / 3; max-height: 44vh; }
    .evp-head { width: 100%; padding: 0 20px; }
    .evp-titlerow { flex-direction: column; gap: 12px; }
    .evp-shareone { padding-top: 0; }
    .evp-accbody { padding: 14px; }
    /* Full-width bar on phones - the thumb reaches it without hunting. */
    .evp-fab {
        left: 0; right: 0; bottom: 0; justify-content: center;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: linear-gradient(to top, rgba(26,31,58,.98) 60%, rgba(26,31,58,0));
    }
    .evp-fab .btn { width: min(460px, 100%); }
}

/* markdown extras: rules, quotes and tables the organiser pasted in */
.evp-md hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.evp-md blockquote {
    margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--primary);
    background: rgba(231,134,106,.07); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.evp-tablewrap { overflow-x: auto; margin: 10px 0; }
.evp-tablewrap table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.evp-tablewrap th, .evp-tablewrap td {
    border: 1px solid var(--border); padding: 8px 12px; text-align: left; vertical-align: top;
}
.evp-tablewrap th { color: var(--text); font-weight: 700; background: rgba(172,159,255,.08); }

/* Post-signup: who got a place, who is on the waiting list. */
.reg-who { margin: 14px 0 4px; text-align: left; }
.reg-whorow {
    display: flex; align-items: center; gap: 12px; padding: 9px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 6px;
    background: rgba(45,53,102,.28);
}
.reg-whorow .nm { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; font-size: .92rem; }
.reg-whorow .st {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    padding: 3px 10px; border-radius: var(--radius-pill);
}
.reg-whorow .st.ok { background: rgba(93,199,140,.16); color: #5DC78C; }
.reg-whorow .st.wait { background: rgba(231,177,106,.16); color: #E7B16A; }
.reg-whorow .st.pay { background: rgba(172,159,255,.16); color: var(--secondary); }

/* ---- share sheet with the gym-styled QR ---- */
.evp-sharewrap {
    position: fixed; inset: 0; z-index: 200; display: flex;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(10,13,28,.72); backdrop-filter: blur(4px);
}
.evp-sharecard {
    position: relative; width: min(420px, 100%); max-height: 92vh; overflow-y: auto;
    background: var(--bg-elev); border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl); padding: 26px 24px 22px; text-align: center;
    box-shadow: var(--shadow-lg);
}
.evp-sharecard h3 { font-size: 1.2rem; margin-bottom: 6px; }
.evp-sharecard > p { color: var(--text-dim); font-size: .88rem; margin-bottom: 16px; }
.evp-sharecard canvas {
    width: min(280px, 100%); height: auto; border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.evp-shareurl {
    margin: 14px 0 16px; padding: 9px 12px; word-break: break-all;
    background: rgba(0,0,0,.22); border-radius: var(--radius-md);
    color: var(--text-faint); font-size: .78rem;
}
.evp-sharebtns { display: flex; flex-direction: column; gap: 8px; }
.evp-sharex {
    position: absolute; top: 12px; right: 14px; width: 32px; height: 32px;
    border-radius: 50%; background: rgba(255,255,255,.06); color: var(--text-dim);
    font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.evp-sharex:hover { background: rgba(255,255,255,.12); color: var(--text); }

/* The navbar is fixed, so a plain #signup jump hides the section under it. */
#sec-signup { scroll-margin-top: 90px; }

/* ---- who is already entered from this account ---- */
.reg-mine { margin-bottom: 18px; }
/* Your own entries stand out from the post-signup summary they share markup
   with: a real place held, with a way to give it up. */
.reg-whorow.mine {
    border: 2px solid var(--primary);
    background: rgba(231,134,106,.07);
}
.reg-wd {
    flex: none; padding: 6px 12px; border-radius: var(--radius-pill);
    border: 1px solid rgba(226,110,110,.55); background: transparent;
    color: #E26E6E; font-size: .78rem; font-weight: 700; cursor: pointer;
}
.reg-wd:hover { background: rgba(226,110,110,.14); border-color: #E26E6E; }
.btn-danger {
    background: #C84B4B; color: #fff;
    box-shadow: 0 4px 16px rgba(200,75,75,.35);
}
.btn-danger:hover { background: #B33F3F; }
.btn-danger[disabled] { opacity: .6; cursor: default; }
.reg-wd-foot { display: flex; flex-direction: column; gap: 8px; }
.reg-sheet-body textarea {
    width: 100%; background: var(--bg-elev); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 10px 12px; font: inherit; font-size: .95rem; resize: vertical;
}
.reg-sheet-body textarea:focus { outline: none; border-color: var(--primary); }
.reg-flash {
    margin-bottom: 14px; padding: 11px 14px; border-radius: var(--radius-md);
    background: rgba(93,199,140,.14); border: 1px solid rgba(93,199,140,.45);
    color: #5DC78C; font-size: .9rem; font-weight: 600;
}
.reg-mine-lead { color: var(--text-dim); font-size: .86rem; margin: 2px 0 10px; }
.reg-mine-add {
    margin-top: 12px; color: var(--text-faint); font-size: .84rem; font-weight: 600;
}
.reg-whorow .nm i { display: block; font-style: normal; font-weight: 400; font-size: .78rem; color: var(--text-faint); }

/* Narrow phones: let the entry row wrap so the long "Wypisz się z wydarzenia"
   button drops to its own full-width line under the name/status instead of
   overflowing the frame and pushing the whole page sideways. */
@media (max-width: 480px) {
    .reg-whorow { flex-wrap: wrap; row-gap: 8px; }
    .reg-whorow .nm { flex: 1 1 auto; }
    .reg-whorow .reg-wd { flex: 1 1 100%; text-align: center; }
}

/* Sign-up breakdown: totals + gender, mirroring the app's participant pills. */
.ev-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: var(--radius-pill);
    font-size: .82rem; font-weight: 700; line-height: 1.2;
}
.ev-pill svg { width: 13px; height: 13px; }
.ev-pill.all { background: rgba(231,134,106,.16); color: var(--primary); }
.ev-pill.f { background: rgba(216,27,96,.16); color: #F06292; }
.ev-pill.m { background: rgba(30,136,229,.16); color: #64B5F6; }
.ev-pill.u { background: rgba(255,255,255,.08); color: var(--text-faint); }
.ev-bycat { margin-top: 8px; }
.ev-bycat summary {
    cursor: pointer; color: var(--secondary); font-size: .8rem; font-weight: 600;
    list-style: none;
}
.ev-bycat summary::-webkit-details-marker { display: none; }
.ev-bycat summary::before { content: '▸ '; }
.ev-bycat[open] summary::before { content: '▾ '; }
.ev-catcounts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ev-catcount {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: var(--radius-pill);
    background: rgba(172,159,255,.12); color: var(--text-dim); font-size: .78rem;
}
.ev-catcount b { color: var(--text); }

/* Short description under the event title, before when/where. */
.evp-lead {
    color: var(--text-dim); font-size: 1rem; line-height: 1.6;
    margin: -6px 0 20px; max-width: 70ch;
}
