/* Club calendar, xeschedule1 (19-10-2026): XElementia's Nexus battles (xe_schedule.py, read-only) and the source filter.
   Tribe colours = XE's schedule (how_to_play.html) and the News tribe chips (.nb-tribe--*). */
.ev-k-nexus { --ev: #00f3ff; }
.ev-tribe--aether { --ev: #9370db; } .ev-tribe--air { --ev: #87ceeb; } .ev-tribe--earth { --ev: #3cb043; }
.ev-tribe--fire { --ev: #ff6347; } .ev-tribe--water { --ev: #4f7dff; }

.ev-card.ev-k-nexus { isolation: isolate;
    background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--ev) 13%, transparent), transparent 55%), var(--panel); }
/* The tribe stripe on the left. evcols1: the layer covers the whole card with the card's inner curve, and the stripe is only
   its first 3px, so it follows the rounded corners instead of sticking out at the top (Mortimer 13:22). */
.ev-card.ev-k-nexus::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: calc(var(--radius) - 1px);
    background: linear-gradient(180deg, var(--ev), color-mix(in srgb, var(--ev) 10%, transparent)) left top / 3px 100% no-repeat; }
.ev-card.ev-k-nexus:hover { border-color: color-mix(in srgb, var(--ev) 45%, transparent); transform: translateY(-1px); }
.ev-card.ev-k-nexus .ev-date { background: color-mix(in srgb, var(--ev) 10%, rgba(255,255,255,0.03));
    box-shadow: 0 0 22px color-mix(in srgb, var(--ev) 22%, transparent); }
.ev-card.ev-k-nexus.is-live { border-color: rgba(34,197,94,0.55); }
.ev-list--past .ev-card.ev-k-nexus { --ev: #8b93a7; }

.ev-xe { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; color: #e6fdff;
    background: linear-gradient(90deg, rgba(0,243,255,0.16), rgba(147,112,219,0.16)); border: 1px solid rgba(0,243,255,0.38); transition: background 0.2s, box-shadow 0.2s; }
.ev-xe:hover, .ev-xe:focus-visible { background: linear-gradient(90deg, rgba(0,243,255,0.28), rgba(147,112,219,0.28)); box-shadow: 0 0 14px rgba(0,243,255,0.25); }
.ev-xe-mark { font-size: 0.85em; line-height: 1; }
.ev-tribe { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; color: #fff;
    background: color-mix(in srgb, var(--ev) 15%, transparent); border: 1px solid color-mix(in srgb, var(--ev) 48%, transparent); }
.ev-tribe-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ev); box-shadow: 0 0 8px var(--ev); }

.ev-xe-facts { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.ev-xe-facts li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 10px; font-size: 0.8rem; font-weight: 600;
    color: #d6deeb; background: rgba(255,255,255,0.05); border: 1px solid var(--line); }
.ev-xe-facts li b { color: #fff; font-weight: 800; }
.ev-xe-facts .ev-xe-reward { color: #fff; font-weight: 800; border-color: color-mix(in srgb, var(--ev) 40%, transparent);
    background: color-mix(in srgb, var(--ev) 12%, transparent); }
.ev-xe-btn span { display: inline-block; transition: transform 0.2s; }
.ev-xe-btn:hover span { transform: translate(2px, -2px); }

.ev-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.ev-filter[hidden] { display: none; }
.ev-filter button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.86rem;
    font-weight: 800; color: var(--muted); background: var(--panel); border: 1px solid var(--line); transition: color 0.2s, border-color 0.2s, background 0.2s; }
.ev-filter button > span:last-child { font-size: 0.74rem; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,0.07); color: inherit; }
.ev-filter button:hover { color: var(--text); border-color: var(--line-strong); }
.ev-filter button.is-on { color: #fff; border-color: rgba(0,221,235,0.55); background: rgba(0,221,235,0.12); box-shadow: 0 0 16px rgba(0,221,235,0.15); }
.ev-filter button.ev-filter-xe.is-on { border-color: rgba(0,243,255,0.6); background: linear-gradient(90deg, rgba(0,243,255,0.16), rgba(147,112,219,0.18)); }

@media (max-width: 640px) {
    .ev-filter { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 18px; padding: 0 16px 4px; scrollbar-width: none; }
    .ev-filter::-webkit-scrollbar { display: none; }
    .ev-filter button { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .ev-card.ev-k-nexus:hover { transform: none; } .ev-xe-btn span { transition: none; } }

/* calendar1 (19-10-2026): an open "Add to calendar" menu stays above the next cards */
.ev-card:has(.ev-cal[open]) { z-index: 30; }
.ev-card.is-flash { animation: ev-flash 1.4s ease-out; }
@keyframes ev-flash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ev) 70%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }

/* BASC Lotto and XE Raffles (ecosystem_calendar.py) */
.ev-k-lotto { --ev: #facc15; } .ev-k-raffle { --ev: #e879f9; } .ev-k-vote { --ev: #2dd4bf; }   /* vote: votecal1 */
.ev-card.ev-k-lotto, .ev-card.ev-k-raffle, .ev-card.ev-k-vote { background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--ev) 10%, transparent), transparent 55%), var(--panel); }
.ev-list--past .ev-card.ev-k-lotto, .ev-list--past .ev-card.ev-k-raffle, .ev-list--past .ev-card.ev-k-vote { --ev: #8b93a7; }
.ev-app { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; color: #fff;
    background: color-mix(in srgb, var(--ev) 15%, transparent); border: 1px solid color-mix(in srgb, var(--ev) 48%, transparent); transition: background 0.2s, box-shadow 0.2s; }
.ev-app:hover, .ev-app:focus-visible { background: color-mix(in srgb, var(--ev) 28%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--ev) 30%, transparent); }
.ev-filter button.ev-filter-lotto.is-on { border-color: rgba(250,204,21,0.6); background: rgba(250,204,21,0.14); box-shadow: 0 0 16px rgba(250,204,21,0.15); }
.ev-filter button.ev-filter-raffle.is-on { border-color: rgba(232,121,249,0.6); background: rgba(232,121,249,0.14); box-shadow: 0 0 16px rgba(232,121,249,0.15); }
.ev-filter button.ev-filter-vote.is-on { border-color: rgba(45,212,191,0.6); background: rgba(45,212,191,0.14); box-shadow: 0 0 16px rgba(45,212,191,0.15); }

/* The month grid */
.cal { margin: 0 0 34px; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line);
    background: radial-gradient(90% 120% at 100% 0%, rgba(0,221,235,0.07), transparent 60%), radial-gradient(80% 120% at 0% 100%, rgba(147,112,219,0.08), transparent 60%), var(--panel);
    box-shadow: 0 18px 50px rgba(0,0,0,0.25); }
.cal[hidden] { display: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.cal-title { margin: 0; font-size: 1.35rem; font-weight: 900; letter-spacing: 0.01em; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav button { height: 38px; min-width: 38px; padding: 0 12px; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 800; font-size: 0.86rem;
    color: var(--text); background: rgba(255,255,255,0.05); border: 1px solid var(--line); transition: background 0.2s, border-color 0.2s, opacity 0.2s; }
.cal-nav .cal-arrow { font-size: 1.3rem; line-height: 1; padding: 0 10px; }
.cal-nav button:hover:not(:disabled) { background: rgba(0,221,235,0.12); border-color: rgba(0,221,235,0.5); }
.cal-nav button:disabled { opacity: 0.35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wd { padding: 2px 8px 6px; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-height: 104px; padding: 8px; text-align: left; cursor: pointer;
    font: inherit; color: var(--text); border-radius: 12px; background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.06);
    transition: background 0.18s, border-color 0.18s, transform 0.18s; }
.cal-day:hover { background: rgba(255,255,255,0.06); border-color: var(--line-strong); }
.cal-day:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.cal-day.is-out { opacity: 0.38; }
.cal-day.is-before .cal-pill { opacity: 0.6; }
.cal-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; font-size: 0.88rem; font-weight: 800; color: #cbd5e1; }
.cal-day.has-ev .cal-num { color: #fff; }
.cal-day.is-today .cal-num { color: #04121a; background: linear-gradient(135deg, var(--cyan), #7dd3fc); box-shadow: 0 0 16px rgba(0,221,235,0.45); }
.cal-day.is-on { border-color: rgba(0,221,235,0.65); background: rgba(0,221,235,0.08); box-shadow: inset 0 0 0 1px rgba(0,221,235,0.25), 0 0 20px rgba(0,221,235,0.12); }
.cal-pills { display: grid; gap: 3px; min-width: 0; }
.cal-pill { --c: var(--cyan); display: flex; align-items: center; gap: 5px; min-width: 0; padding: 2px 6px; border-radius: 7px; font-size: 0.7rem; line-height: 1.35;
    color: #e2e8f0; background: color-mix(in srgb, var(--c) 14%, transparent); border-left: 2px solid var(--c); }
.cal-pill b { flex: none; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.cal-pill span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-dot { display: none; }
.cal-more { font-size: 0.68rem; font-weight: 800; color: var(--muted); padding-left: 4px; }

/* one colour per source, the same as the cards */
.cal-ag { --c: var(--cyan); }
.cal-t-k-space { --c: #38bdf8; } .cal-t-k-call { --c: var(--cyan); } .cal-t-k-tournament { --c: #f87171; } .cal-t-k-giveaway { --c: var(--gold); }
.cal-t-k-launch { --c: var(--orange); } .cal-t-k-meetup { --c: #c4b5fd; } .cal-t-k-other { --c: #94a3b8; }
.cal-t-k-lotto { --c: #facc15; } .cal-t-k-raffle { --c: #e879f9; } .cal-t-k-vote { --c: #2dd4bf; }
.cal-t-tribe-aether { --c: #9370db; } .cal-t-tribe-air { --c: #87ceeb; } .cal-t-tribe-earth { --c: #3cb043; } .cal-t-tribe-fire { --c: #ff6347; }
.cal-t-tribe-water { --c: #4f7dff; } .cal-t-tribe-xe { --c: #00f3ff; }
.cal-t-dao-cyan { --c: #00ddeb; } .cal-t-dao-orange { --c: #fb923c; } .cal-t-dao-violet { --c: #a78bfa; } .cal-t-dao-green { --c: #4ade80; }
.cal-t-dao-gold { --c: #facc15; } .cal-t-dao-pink { --c: #f472b6; } .cal-t-dao-red { --c: #f87171; } .cal-t-dao-blue { --c: #60a5fa; }

/* The chosen day */
.cal-agenda { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.cal-ag-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cal-ag-head b { font-size: 1.02rem; font-weight: 800; }
.cal-ag-head .count { font-size: 0.75rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: rgba(255,255,255,0.07); color: var(--muted); }
.cal-ag-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cal-ag-link { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
    background: linear-gradient(90deg, color-mix(in srgb, var(--c) 12%, transparent), transparent 45%), rgba(255,255,255,0.03); transition: border-color 0.18s, transform 0.18s; }
.cal-ag-link:hover, .cal-ag-link:focus-visible { border-color: color-mix(in srgb, var(--c) 55%, transparent); transform: translateX(2px); }
.cal-ag-time { flex: none; min-width: 52px; padding: 4px 8px; border-radius: 9px; text-align: center; font-weight: 900; font-size: 0.86rem; font-variant-numeric: tabular-nums;
    color: #fff; background: color-mix(in srgb, var(--c) 22%, transparent); }
.cal-ag-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cal-ag-src { font-size: 0.66rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c); }
.cal-ag-title { font-weight: 800; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-ag-go { flex: none; color: var(--muted); font-weight: 900; }
.cal-ag.is-past { opacity: 0.6; }
.cal-next { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 10px 14px; border-radius: 12px; cursor: pointer; font: inherit; font-size: 0.88rem;
    color: var(--muted); background: rgba(255,255,255,0.04); border: 1px dashed var(--line-strong); }
.cal-next b { color: var(--text); }
.cal-next:hover { border-color: rgba(0,221,235,0.55); color: var(--text); }

@media (max-width: 900px) { .cal-pill b { display: none; } }
@media (max-width: 640px) {
    .cal { padding: 14px 10px; margin-left: -4px; margin-right: -4px; }
    .cal-title { font-size: 1.12rem; }
    .cal-nav button { height: 34px; min-width: 34px; }
    .cal-grid { gap: 3px; }
    .cal-wd { padding: 0 0 4px; text-align: center; font-size: 0.62rem; letter-spacing: 0.06em; }
    .cal-day { min-height: 54px; padding: 4px 2px; align-items: center; border-radius: 10px; }
    .cal-num { width: 26px; height: 26px; font-size: 0.82rem; }
    .cal-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
    .cal-pill { padding: 0; width: 7px; height: 7px; border: 0; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); }
    .cal-pill b, .cal-pill span { display: none; }
    .cal-more { font-size: 0.6rem; padding: 0; line-height: 7px; }
    .cal-ag-link { gap: 10px; padding: 10px; }
    .cal-ag-title { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .cal-day, .cal-ag-link { transition: none; } .cal-ag-link:hover { transform: none; } .ev-card.is-flash { animation: none; } }
.ev-page [hidden] { display: none !important; }

/* evcols1 (19-10-2026, Mortimer: «al menos en computer o resoluciones altas podemos crear 2 columnas»): on wide screens the
   day's agenda, Coming up / Happening now and Past events go in two columns; cards in a row share the same height. The event
   image gets smaller so the text keeps its room. Below 1100px everything stays in one column as before. */
@media (min-width: 1100px) {
    .ev-page .ev-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
    .ev-page .ev-list > .ev-card:only-child { grid-column: 1 / -1; }
    .ev-page .ev-list .ev-img { width: 124px; height: 96px; align-self: flex-start; }
    .ev-page .ev-list .ev-card { min-width: 0; }
    .ev-page .ev-list .ev-body { min-width: 0; display: flex; flex-direction: column; }
    .ev-page .ev-list .ev-actions { margin-top: auto; padding-top: 8px; }     /* buttons line up at the bottom of each row */
    .cal-ag-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cal-ag-list > li:only-child { grid-column: 1 / -1; }
}

/* homeev1 (21-10-2026): «+ Add event» under the header, only for the people who can edit the calendar */
.ev-add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 20px; position: relative; }
.ev-add { display: inline-flex; align-items: center; gap: 8px; }
.ev-add-plus { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 1.1rem; font-weight: 900; line-height: 1; background: rgba(255,255,255,0.22); }

/* sitecal1 (25-10-2026): the Ape Sites, a post's poll ending (lime) and the Site of the Week (gold) */
.ev-k-sitepoll { --ev: #a3e635; } .ev-k-sotw { --ev: #fbbf24; }
.ev-card.ev-k-sitepoll, .ev-card.ev-k-sotw { background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--ev) 10%, transparent), transparent 55%), var(--panel); }
.ev-list--past .ev-card.ev-k-sitepoll, .ev-list--past .ev-card.ev-k-sotw { --ev: #8b93a7; }
.ev-card.ev-k-sotw.is-live { border-color: color-mix(in srgb, var(--ev) 45%, var(--line)); box-shadow: 0 0 28px color-mix(in srgb, var(--ev) 14%, transparent); }
.ev-app--site { max-width: 100%; }
.ev-site-pic, .hev-site-pic { flex: none; width: 18px; height: 18px; margin-left: -6px; border-radius: 50%; object-fit: cover;
    border: 1px solid color-mix(in srgb, var(--ev) 60%, transparent); box-shadow: 0 0 8px color-mix(in srgb, var(--ev) 35%, transparent); }
.hev-site-pic { width: 16px; height: 16px; margin-left: -4px; }
.ev-xe-facts .ev-site-note { color: var(--muted); font-weight: 700; }
.ev-card.ev-k-sotw .ev-img, .ev-card.ev-k-sitepoll .ev-img { border-color: color-mix(in srgb, var(--ev) 30%, var(--line)); }
.ev-filter button.ev-filter-site.is-on { border-color: rgba(163,230,53,0.6); background: linear-gradient(90deg, rgba(163,230,53,0.15), rgba(251,191,36,0.15)); box-shadow: 0 0 16px rgba(163,230,53,0.15); }
.cal-t-k-sitepoll { --c: #a3e635; } .cal-t-k-sotw { --c: #fbbf24; }

/* gwcal1 (25-10-2026): the BASC team's giveaways. A Live running (hot pink, it breathes), one waiting for its spin and the
   finished ones (gold, the winners with a crown) */
.ev-k-gwlive { --ev: #ff3d7f; } .ev-k-gwdraw { --ev: #fbbf24; } .ev-k-gwdone { --ev: #f5c542; }
.ev-card.ev-k-gwlive, .ev-card.ev-k-gwdraw, .ev-card.ev-k-gwdone { background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--ev) 11%, transparent), transparent 55%), var(--panel); }
.ev-list--past .ev-card.ev-k-gwdone { --ev: #c9a646; }
.ev-card.ev-k-gwlive.is-live, .ev-card.ev-k-gwdraw.is-live { border-color: color-mix(in srgb, var(--ev) 50%, var(--line)); animation: ev-gw-breathe 2.8s ease-in-out infinite; }
@keyframes ev-gw-breathe { 0%, 100% { box-shadow: 0 0 22px color-mix(in srgb, var(--ev) 12%, transparent); } 50% { box-shadow: 0 0 38px color-mix(in srgb, var(--ev) 28%, transparent); } }
.ev-card.ev-k-gwlive .ev-img, .ev-card.ev-k-gwdraw .ev-img, .ev-card.ev-k-gwdone .ev-img { border-color: color-mix(in srgb, var(--ev) 35%, var(--line)); }
.ev-xe-facts .ev-gw-state { color: var(--muted); font-weight: 800; }
.ev-xe-facts .ev-gw-state.is-open { color: color-mix(in srgb, var(--ev) 75%, #fff); }
.ev-xe-facts .ev-gw-state .mk-dot { margin-right: 6px; }
.ev-xe-facts .ev-gw-win { font-weight: 900; color: #3a2400; background: linear-gradient(135deg, #fff1b8, #f5c542 45%, #e09a12); border-color: rgba(255,214,102,0.7);
    box-shadow: 0 0 12px rgba(245,197,66,0.3), inset 0 1px 0 rgba(255,255,255,0.6); }
.ev-gw-crown { margin-right: 4px; font-size: 0.9em; }
.ev-gw-btn { background: linear-gradient(90deg, #ff3d7f, #ff8a3d); }
.ev-card.ev-k-gwdraw .ev-gw-btn { background: linear-gradient(90deg, #f5c542, #e09a12); color: #2a1a00; }
.ev-filter button.ev-filter-gw.is-on { border-color: rgba(255,61,127,0.6); background: linear-gradient(90deg, rgba(255,61,127,0.16), rgba(245,197,66,0.16)); box-shadow: 0 0 16px rgba(255,61,127,0.16); }
.cal-t-k-gwlive { --c: #ff3d7f; } .cal-t-k-gwdraw, .cal-t-k-gwdone { --c: #f5c542; }
.hev-chip--gw { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .ev-card.ev-k-gwlive.is-live, .ev-card.ev-k-gwdraw.is-live { animation: none; } }
.hev-prize { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 0; font-size: 0.86rem; font-weight: 800; color: #ffd36b; }
