/*
 * Events: index, calendar, festival / series and event pages.
 * Page bodies are documents that keep the reference markup, so these rules follow the
 * reference stylesheets; component scopes are data-s attributes (DocBuilder::SCOPES).
 */

/* event page */
.ev-banner[data-s~=bn]{position:relative;overflow:hidden;min-height:260px;padding:32px 0 40px;color:var(--chrome-text);background-color:var(--chrome);background-image:radial-gradient(60% 120% at 50% 40%,rgb(255 138 61 / 18%),transparent 70%),repeating-linear-gradient(90deg,rgb(255 255 255 / 4%) 0 6px,transparent 6px 46px)}
.ev-banner[data-s~=bn].has-art{background:radial-gradient(ellipse 45% 70% at 50% 50%,rgb(14 18 25 / 72%),transparent 80%),linear-gradient(90deg,rgb(14 18 25 / 45%),transparent 20%,transparent 80%,rgb(14 18 25 / 45%)),linear-gradient(#0e12194d,#0e121973),var(--banner-art) center 45% / cover no-repeat,var(--chrome)}
.ev-banner[data-s~=bn]:after{content:"";position:absolute;inset:auto 0 0;height:3px;background:var(--stripe)}
.bg[data-s~=bn]{position:absolute;inset:-40px;width:calc(100% + 80px);height:calc(100% + 80px);object-fit:cover;object-position:var(--pic-pos, top);filter:blur(28px) brightness(.45)}
.in[data-s~=bn]{position:relative;display:grid;align-items:center;gap:28px}
.own[data-s~=bn] .in[data-s~=bn]{grid-template-columns:minmax(260px,1fr) minmax(0,var(--pic-w))}
.own[data-s~=bn] .pic[data-s~=bn]{order:2;display:block;width:100%;height:auto;aspect-ratio:670 / 300;object-fit:cover;object-position:var(--pic-pos, top);border-radius:var(--radius);box-shadow:0 6px 24px #0000008c}
.own[data-s~=bn].tall .pic[data-s~=bn]{aspect-ratio:670 / 420}
.crumbs[data-s~=bn]{margin:0 0 14px;font-size:.85rem;color:var(--chrome-muted)}
.crumbs[data-s~=bn] a{color:var(--chrome-text);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--chrome-text) 40%,transparent)}
.crumbs[data-s~=bn] a:hover{color:var(--chrome-accent)}
.title[data-s~=bn]{display:flex;gap:14px;align-items:center}
.ico[data-s~=bn]{width:64px;height:64px;object-fit:contain;flex:none}
h1[data-s~=bn]{margin:0;font-size:2.2rem;font-weight:700;line-height:1.1;color:var(--chrome-text);text-shadow:0 2px 8px rgb(0 0 0 / 60%)}
.text[data-s~=bn] .lead{margin:12px 0 0;max-width:60ch;font-size:1.05rem;color:var(--chrome-muted);text-shadow:0 1px 4px rgb(0 0 0 / 85%),0 0 12px rgb(0 0 0 / 50%)}
.own[data-s~=bn] .text[data-s~=bn] .lead{color:var(--chrome-text)}
.has-art[data-s~=bn] .in[data-s~=bn],.plain[data-s~=bn] .in[data-s~=bn]{text-align:center}
.has-art[data-s~=bn] .title[data-s~=bn],.plain[data-s~=bn] .title[data-s~=bn]{justify-content:center}
.has-art[data-s~=bn] .text[data-s~=bn] .lead,.plain[data-s~=bn] .text[data-s~=bn] .lead{margin-inline:auto;text-wrap:balance}
@media(max-width:640px){.ev-banner[data-s~=bn]{min-height:190px;padding:24px 0 28px}.own[data-s~=bn] .in[data-s~=bn]{grid-template-columns:minmax(0,1fr);gap:18px}.own[data-s~=bn] .pic[data-s~=bn]{order:-1}h1[data-s~=bn]{font-size:1.7rem}}

/* event page stylesheet */
.picker[data-s~=pk2]{display:inline-grid;gap:4px}
.rules h3{margin:16px 0 6px}
.rules h3:first-child{margin-top:0}
.rules p{white-space:pre-line;margin:0 0 10px}
.rules .txt-img{height:2em;width:auto;vertical-align:middle}
.rules .hexa{display:inline-grid;width:38px;height:31px;vertical-align:middle}
details.phase{margin:8px 0;padding:10px 14px}
details.phase summary{cursor:pointer}
details.phase[open] summary{margin-bottom:8px}
details.phase h3{margin:14px 0 6px;font-size:.95rem}
details.phase .need{margin:0 0 8px;font-size:.85rem}
.round-tabs[data-s~=eb]{margin:8px 0 6px}
.round-note[data-s~=eb]{margin:14px 0 0}
.note[data-s~=eb]{margin-top:20px}
.facts[data-s~=eb]{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));margin:16px 0}
.hero-line[data-s~=eb]{display:flex;align-items:center;gap:12px}
.sched[data-s~=eb] td[data-s~=eb],.sched[data-s~=eb] th[data-s~=eb]{text-align:start;white-space:nowrap}
.featured[data-s~=eb] td[data-s~=eb]:first-child{font-weight:600}
.plain[data-s~=eb]{list-style:none;padding:0;margin:6px 0 0;display:grid;gap:4px}
.plain[data-s~=eb] li[data-s~=eb]{display:flex;gap:8px;align-items:center}
.days[data-s~=eb]{margin:0 0 12px;padding-inline-start:22px}
.badge[data-s~=eb].win{margin-inline-start:6px;color:var(--good)}
.small[data-s~=eb]{font-size:.85rem}
.challenge[data-s~=eb]{display:grid;gap:6px;margin:12px 0}
.gorilla-tabs[data-s~=eb]{margin:18px 0 6px}
.gpanel[data-s~=eb] h3[data-s~=eb]{margin:28px 0 10px;font-size:1.05rem}
.gorilla-chip[data-s~=eb]{display:inline-flex;align-items:center;gap:8px}
.trial-boss[data-s~=eb]{display:grid;gap:16px;grid-template-columns:minmax(200px,320px) 1fr;align-items:center;margin:12px 0;padding:12px}
.trial-banner[data-s~=eb]{width:100%;height:auto;border-radius:8px;display:block}
.trial-who[data-s~=eb] h2[data-s~=eb]{margin:0 0 6px}
.trial-who[data-s~=eb] p[data-s~=eb]{margin:0 0 10px}
.chain-line[data-s~=eb]{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:6px 0 12px}
@media(max-width:640px){.trial-boss[data-s~=eb]{grid-template-columns:1fr}}
.boss-head[data-s~=eb]{width:28px;height:28px;border-radius:6px;object-fit:contain;flex:none}
.facts[data-s~=eb] .wide[data-s~=eb]{grid-column:1 / -1}
.facts[data-s~=eb] .card[data-s~=eb] p[data-s~=eb]{margin:6px 0 0}
.times[data-s~=eb]{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px 8px}
.times[data-s~=eb] li[data-s~=eb]{background:var(--surface-2);border-radius:6px;padding:2px 10px;font-weight:600;font-variant-numeric:tabular-nums}
.gear-help[data-s~=eb]{max-width:80ch;margin:0 0 8px;padding-inline-start:36px}
.gear-help[data-s~=eb] li[data-s~=eb]{margin:0 0 6px}
.gear-level[data-s~=eb]{margin:20px 0 2px;font-size:1.05rem}
.gear-name[data-s~=eb]{display:inline-flex;align-items:center;gap:8px}
.gear-ico[data-s~=eb]{width:40px;height:40px;object-fit:contain;flex:none}
.plans[data-s~=eb]{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));margin:12px 0}
.plan[data-s~=eb] h3[data-s~=eb]{margin:0 0 8px;font-size:1rem}
.plan-gear[data-s~=eb]{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.plan-gear[data-s~=eb] li[data-s~=eb]{display:flex;align-items:center;gap:8px}
.facts[data-s~=ev]{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin:20px 0}
.facts[data-s~=ev]:empty{display:none}
.small[data-s~=ev]{font-size:.85rem}
.pickers[data-s~=ev]{display:inline-flex;flex-wrap:wrap;gap:16px;padding:12px 16px;position:sticky;top:8px;z-index:2}

/* event page */
.picker[data-s~=pk]{display:inline-grid;gap:4px}
.picker-chips[data-s~=pk]{display:grid;gap:4px;margin:0 0 12px}
.small[data-s~=pk]{font-size:.85rem}
.run-status[hidden]{display:none}
.run-status{white-space:nowrap;vertical-align:middle}
.run-status[data-state=running]{color:var(--good)}
.run-status[data-state=upcoming]{color:var(--gold)}
.run-status[data-state=ended]{color:var(--muted)}
.rw-grid{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--rw-col, 220px)),1fr));gap:10px 14px}
.rw-grid li{min-width:0;background:var(--surface-2);border-radius:10px;padding:6px 14px 6px 10px}
.ev-table td{white-space:normal;vertical-align:top}
.ev-table td:first-child{white-space:nowrap}
.ev-table.src td:first-child{white-space:normal}
.ev-table th:last-child,.ev-table td:last-child{text-align:start}
.ev-table td.wrap,.ev-table td.wrap:first-child{white-space:normal;min-width:220px;padding:7px 12px;max-width:none;margin:0}
.ev-table.nums th:last-child,.ev-table.nums td:last-child{text-align:end}
.ev-table.start th,.ev-table.start td{text-align:start}
.ev-table.start td.head{min-width:120px;white-space:normal}
.ev-table th.col-paid{color:var(--gold)}
.ev-table th.col-premium,.ev-table .medal{color:var(--q-ssr)}
.table-wrap+h3,[data-staged]:has(.table-wrap)+h3{margin-top:28px}
.oi-row{display:inline-flex;align-items:center;gap:6px;max-width:100%}
.oi{flex:none;width:28px;height:28px;object-fit:contain}
th .oi{width:24px;height:24px}
.chip .oi{width:20px;height:20px}
.offer-cell-sub{font-size:.85rem;white-space:pre-line}
.offer-title{margin:30px 0 10px;font-size:1.05rem}
.offer-fold>summary{cursor:pointer;font-weight:700}
.offer-small{font-size:.85rem}
.offer-pass,.offer-pack{display:grid;gap:8px;margin:12px 0}
.offer-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
.offer-price{font-family:var(--font-display);font-size:1.15rem;font-weight:600;font-variant-numeric:tabular-nums}
.badge.offer-disc{color:var(--good)}
.badge.offer-tag{color:var(--muted)}
.offer-packs{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));margin:12px 0}
.offer-pack{margin:0;align-content:start;min-width:0}
.offer-pack .rw li{white-space:normal;overflow-wrap:anywhere}
.offer-heroes{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-wrap:wrap;gap:8px 20px}
.offer-heroes li{display:flex;align-items:center;gap:10px}
.offer-note{margin:10px 0}
.offer-note p{margin:0 0 6px;white-space:pre-line}
.offer-events{list-style:none;margin:10px 0;padding:0;display:grid;gap:8px}
.offer-events a{font-weight:600}
.offer-links{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.offer-links .chip{display:inline-flex;align-items:center;gap:4px;cursor:pointer}
.v-tabs{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--tab-w, 12ch)),1fr));gap:6px;margin:14px 0 8px}
.v-tabs .chip{text-align:center}
.v-panel .offer-pass{margin-top:4px}
.table-wrap.offer-table{margin:10px 0 24px}
.rw{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:4px 6px;font-size:.88rem}
.rw li{background:var(--surface-2);border-radius:6px;padding:1px 8px;white-space:nowrap}
table[style*=--chip-w] .rw{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,calc(var(--chip-w) + 34px)),1fr))}
.rw li[class]:before{content:"";display:inline-block;width:18px;height:18px;margin:0 4px 0 -4px;vertical-align:-4px;background:var(--ri) center / contain no-repeat}
.plan-tabs{margin:12px 0 8px}
.boss-table td,.boss-table th{text-align:start}
.boss-table td.boss-name{white-space:nowrap}
.boss-table .boss-bonus{min-width:220px;white-space:pre-line}
.boss-table .boss-bonus small,.boss-table .boss-name small{display:block;font-size:.8rem;line-height:1.3;white-space:normal}
.boss-table .boss-who{display:inline-flex;align-items:center;gap:10px}
.boss-table .boss-head{width:40px;height:40px;border-radius:8px;object-fit:contain;flex:none}
.boss-table .boss-ratio{min-width:120px}
.boss-table .ratio-bar{display:flex;height:8px;border-radius:99px;overflow:hidden;background:var(--surface-2);margin-bottom:4px}
.boss-table .ratio-bar .bo{background:var(--t-bomber)}
.boss-table .ratio-bar .sh{background:var(--t-shooter)}
.boss-table .ratio-text{font-size:.85rem;font-weight:600}
.boss-squads{font-size:.85rem}
.item-icon{box-sizing:border-box;flex:none;object-fit:contain;border:2px solid var(--iq, var(--border));border-radius:8px;background:var(--surface-2);vertical-align:middle}
.dot{width:10px;height:10px;border-radius:50%;display:inline-block;flex:none;background:var(--muted);margin-inline-end:4px}
.iq1{background:var(--iq1)}
.iq2{background:var(--iq2)}
.iq3{background:var(--iq3)}
.iq4{background:var(--iq4)}
.iq5{background:var(--iq5)}
.iq6{background:var(--iq6)}
.rw-card{display:flex;gap:10px;align-items:center}
.rw-card-text{display:grid;gap:2px;min-width:0}
.rw-card-n{font-variant-numeric:tabular-nums}
.rw-card-desc{font-size:.85rem;line-height:1.3}
.rw-card-desc p{margin:0}

/* festival and series pages */
.ev[data-s~=fs] .lead[data-s~=fs]{max-width:none}
.facts[data-s~=fs]{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin:20px 0}
.facts[data-s~=fs]:empty{display:none}
.pickers[data-s~=fs]{display:inline-flex;flex-wrap:wrap;gap:16px;padding:12px 16px;position:sticky;top:8px;z-index:2;margin-bottom:16px}
.run[data-s~=fs]{margin-bottom:28px;scroll-margin-top:72px}
.run-head[data-s~=fs]{margin:8px 0 14px}
summary[data-s~=fs].run-head{cursor:pointer}
.run-title[data-s~=fs]{display:inline;margin:0;font-size:1.5rem}
.run-title[data-s~=fs] .range[data-s~=fs]{color:var(--muted);font-size:1.05rem;font-weight:500}
.ev[data-s~=fs]{margin-bottom:16px;scroll-margin-top:72px}
.head[data-s~=fs]{display:flex;gap:12px;align-items:center;margin-bottom:8px}
.head[data-s~=fs] h2[data-s~=fs],.head[data-s~=fs] h3[data-s~=fs]{margin:0;font-size:1.25rem}
.ico-ev[data-s~=fs]{width:44px;height:44px;object-fit:contain;flex:none}
.ico-none[data-s~=fs]{border-radius:10px;background:var(--surface-2)}
.small[data-s~=fs]{font-size:.85rem}
.ev[data-s~=fs] h3[data-s~=fs],.ev[data-s~=fs] h4[data-s~=fs]{margin:16px 0 8px}
.ev[data-s~=fs] .head[data-s~=fs] h3[data-s~=fs]{margin:0}
.more[data-s~=fs]{margin:14px 0 0;font-weight:600}

/* calendar */
.cal-crumbs{font-size:.85rem;color:var(--muted);margin-bottom:16px}
.cal-title{display:flex;gap:12px;align-items:center;margin-bottom:.5em}
.cal-title h1{margin:0}
.cal-ico{width:24px;height:24px;object-fit:contain;flex:none}
.cal-ico-lg{width:48px;height:48px}
.cal-ev{display:flex;gap:8px;align-items:center}
.cal-pickers{display:inline-flex;padding:12px 16px;margin:8px 0 4px}
.cal-toc{display:flex;flex-wrap:wrap;gap:6px;margin:16px 0 4px}
.cal-toc .chip{color:inherit;font-size:.85rem}
.cal-toc .chip:hover{text-decoration:none;border-color:var(--accent)}
.cal-sec{scroll-margin-top:12px}
.cal td{white-space:normal;vertical-align:top;text-align:start}
.cal th{text-align:start}
.cal td:first-child{min-width:160px}
.cal td:nth-child(2),.cal td:nth-child(3){white-space:nowrap}

/* index */
.card.ev-tile{display:flex;gap:12px;align-items:flex-start;color:inherit;height:100%;padding:12px 14px}
.ev-tile-text{display:grid;gap:4px;align-content:start;min-width:0}
.ev-tile-ico{width:44px;height:44px;object-fit:contain;flex:none}
.ev-tile-none{border-radius:10px;background:var(--surface-2)}
.card.ev-tile:hover{text-decoration:none;border-color:var(--accent)}
.ev-tile-sub{font-size:.85rem}
.ev-tile-desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.badge.ev-tile-count{margin-inline-start:auto;flex:none;font-size:.75rem;line-height:1;padding:4px 8px;border-radius:999px;border:1px solid var(--border);color:var(--muted)}
.cal-link[data-s~=ix]{display:flex;gap:14px;align-items:center;margin:18px 0 8px;color:inherit;max-width:640px}
.cal-link[data-s~=ix]:hover{text-decoration:none;border-color:var(--accent)}
.cal-link[data-s~=ix]>span[data-s~=ix]:last-child{display:grid;gap:2px}
.cal-icon[data-s~=ix]{font-size:1.8rem;line-height:1}
.cal-img[data-s~=ix]{width:48px;height:48px;object-fit:contain;flex:none}
.bar[data-s~=ix]{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;justify-content:space-between;margin:20px 0 6px}
.tabs[data-s~=ix]{display:flex;flex-wrap:wrap;gap:6px}
.count[data-s~=ix]{font-size:.75rem;opacity:.7;margin-inline-start:2px}
#q[data-s~=ix]{width:240px;max-width:100%}
.panel-title[data-s~=ix]{margin:18px 0 10px}
.grid[data-s~=ix]{list-style:none;padding:0;margin:0;display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.panel-title[data-s~=ix]{display:none}
.searching .panel-title[data-s~=ix]{display:block}
