/* Event guide (events.php). Builds on guide-pages.css. */
.events-page .guide-hero { background:
    radial-gradient(circle at 50% 0, rgba(212, 175, 55, .18), transparent 50%),
    radial-gradient(circle at 12% 80%, rgba(176, 72, 60, .12), transparent 40%),
    linear-gradient(180deg, rgba(31, 25, 20, .94), rgba(10, 9, 8, .8)); }

.eg-count { display: inline-flex; gap: 22px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }
.eg-count span { color: var(--guide-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.eg-count strong { display: block; color: var(--guide-gold); font: 800 1.7rem "Cinzel", serif; letter-spacing: 0; }

.eg-panel { border: 1px solid var(--guide-border); border-radius: 12px; background: linear-gradient(135deg, rgba(42, 35, 28, .9), rgba(15, 14, 12, .96)); box-shadow: 0 16px 38px rgba(0, 0, 0, .42); }

/* How events work */
.eg-basics { padding: 22px 26px; margin-bottom: 26px; }
.eg-basics h2 { margin: 0 0 12px; color: var(--guide-cream); font: 700 1.15rem "Cinzel", serif; display: flex; align-items: center; gap: 10px; }
.eg-basics h2 svg { width: 20px; color: var(--guide-gold); }
.eg-basics ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 7px 34px; grid-template-columns: repeat(2, minmax(0, 1fr)); color: var(--guide-text); line-height: 1.55; font-size: .93rem; }
.eg-basics li::marker { color: var(--guide-gold); }

/* Schedule table */
.eg-schedule { margin-bottom: 28px; overflow: hidden; }
.eg-schedule h2 { margin: 0; padding: 18px 24px; color: var(--guide-cream); font: 700 1.15rem "Cinzel", serif; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--guide-border); }
.eg-schedule h2 svg { width: 20px; color: var(--guide-gold); }
.eg-table-wrap { overflow-x: auto; }
.eg-schedule table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.eg-schedule th { padding: 10px 16px; text-align: left; color: var(--guide-gold); font: 700 .72rem "Cinzel", serif; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; background: rgba(0, 0, 0, .25); }
.eg-schedule td { padding: 9px 16px; border-top: 1px solid rgba(212, 175, 55, .12); color: var(--guide-text); vertical-align: top; }
.eg-schedule td:first-child a { color: var(--guide-cream); font-weight: 600; text-decoration: none; }
.eg-schedule td:first-child a:hover { color: var(--guide-gold); text-decoration: underline; }
.eg-schedule tr:hover td { background: rgba(212, 175, 55, .05); }

/* Toolbar */
.eg-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.eg-search { flex: 1 1 240px; position: relative; }
.eg-search input { width: 100%; padding: 10px 14px 10px 40px; color: var(--guide-text); background: rgba(10, 9, 8, .8); border: 1px solid var(--guide-border); border-radius: 8px; }
.eg-search input:focus { outline: none; border-color: var(--guide-gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .15); }
.eg-search svg { position: absolute; left: 13px; top: 50%; width: 17px; transform: translateY(-50%); color: var(--guide-muted); }
.eg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.eg-chip { padding: 7px 14px; color: var(--guide-muted); background: rgba(10, 9, 8, .7); border: 1px solid var(--guide-border); border-radius: 999px; font-size: .82rem; cursor: pointer; transition: all .15s; }
.eg-chip:hover { color: var(--guide-cream); border-color: var(--guide-gold); }
.eg-chip.is-active { color: #15110c; background: var(--guide-gold); border-color: var(--guide-gold); font-weight: 700; }

/* Layout with sticky contents */
.eg-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; align-items: start; }
.eg-toc { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow-y: auto; padding: 14px 6px 14px 14px; }
.eg-toc summary { cursor: pointer; padding: 0 8px 10px 0; color: var(--guide-cream); font: 700 .95rem "Cinzel", serif; list-style: none; display: flex; align-items: center; gap: 8px; }
.eg-toc summary svg { width: 17px; color: var(--guide-gold); }
.eg-toc h3 { margin: 12px 0 4px; color: var(--guide-gold); font: 700 .68rem "Cinzel", serif; letter-spacing: .14em; text-transform: uppercase; }
.eg-toc ol { margin: 0; padding: 0; list-style: none; }
.eg-toc a { display: block; padding: 5px 10px; margin-right: 8px; color: var(--guide-muted); font-size: .84rem; text-decoration: none; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; }
.eg-toc a:hover { color: var(--guide-cream); background: rgba(212, 175, 55, .07); }
.eg-toc a.is-active { color: var(--guide-cream); border-left-color: var(--guide-gold); background: rgba(212, 175, 55, .1); }
.eg-toc li[hidden] { display: none; }

/* Event cards */
.eg-group-title { margin: 30px 0 14px; color: var(--guide-cream); font: 800 1.25rem "Cinzel", serif; letter-spacing: .05em; display: flex; align-items: center; gap: 12px; }
.eg-group-title:first-child { margin-top: 0; }
.eg-group-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--guide-border), transparent); }
.eg-group-title small { color: var(--guide-muted); font: 400 .8rem "Inter", sans-serif; letter-spacing: 0; }

.eg-event { margin-bottom: 20px; padding: 0; scroll-margin-top: 90px; overflow: hidden; }
.eg-event[hidden] { display: none; }
.eg-head { display: flex; gap: 16px; align-items: flex-start; padding: 20px 24px 14px; }
.eg-icon { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; color: var(--guide-cream); border: 1px solid var(--guide-border); border-radius: 50%; background: rgba(212, 175, 55, .09); }
.eg-icon svg { width: 22px; }
.eg-head h3 { margin: 0; color: var(--guide-cream); font: 700 1.2rem "Cinzel", serif; }
.eg-head p { margin: 6px 0 0; color: #c5beb2; line-height: 1.6; font-size: .94rem; }
.eg-badges { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 6px; }
.eg-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; color: var(--guide-text); font-size: .8rem; border: 1px solid var(--guide-border); border-radius: 6px; background: rgba(0, 0, 0, .28); }
.eg-badge svg { width: 14px; color: var(--guide-gold); }
.eg-badge b { color: var(--guide-cream); font-weight: 600; }
.eg-body { padding: 8px 24px 22px; }
.eg-body h4 { margin: 16px 0 8px; color: var(--guide-gold); font: 700 .78rem "Cinzel", serif; letter-spacing: .12em; text-transform: uppercase; }
.eg-body ul.eg-list { margin: 0; padding-left: 1.1rem; color: var(--guide-text); line-height: 1.6; font-size: .93rem; }
.eg-body ul.eg-list li { margin: 3px 0; }
.eg-body ul.eg-list li::marker { color: var(--guide-gold); }
.eg-note { display: flex; gap: 10px; margin-top: 14px; padding: 11px 14px; color: #f0d9a6; font-size: .88rem; line-height: 1.5; border: 1px solid rgba(212, 175, 55, .35); border-radius: 8px; background: rgba(212, 175, 55, .08); }
.eg-note svg { flex: 0 0 17px; width: 17px; margin-top: 2px; color: var(--guide-gold); }
.eg-note.warn { color: #f3c6bd; border-color: rgba(220, 110, 90, .45); background: rgba(176, 72, 60, .1); }
.eg-note.warn svg { color: #e0816f; }

/* Stage table */
.eg-stages { width: 100%; border-collapse: collapse; font-size: .87rem; }
.eg-stages th { padding: 8px 12px; text-align: left; color: var(--guide-muted); font: 700 .68rem "Cinzel", serif; letter-spacing: .1em; text-transform: uppercase; border-bottom: 1px solid var(--guide-border); white-space: nowrap; }
.eg-stages td { padding: 11px 12px; border-bottom: 1px solid rgba(212, 175, 55, .1); vertical-align: top; color: var(--guide-text); }
.eg-stages tr:last-child td { border-bottom: 0; }
.eg-stage-name { color: var(--guide-cream); font-weight: 700; display: block; }
.eg-stage-brief { display: block; margin-top: 3px; color: var(--guide-muted); font-size: .82rem; line-height: 1.45; }
.eg-stage-map { display: inline-block; margin-top: 4px; color: #8ed7ff; font-size: .78rem; }
.eg-boss { display: inline-block; margin-left: 6px; padding: 1px 7px; color: #15110c; font: 800 .62rem "Inter", sans-serif; letter-spacing: .06em; text-transform: uppercase; border-radius: 4px; background: #e0816f; vertical-align: 2px; }
.eg-mon { display: block; line-height: 1.5; }
.eg-rew { display: flex; flex-wrap: wrap; gap: 5px 8px; }
.eg-pill { padding: 2px 8px; font-size: .78rem; color: var(--guide-cream); border-radius: 5px; background: rgba(212, 175, 55, .13); border: 1px solid rgba(212, 175, 55, .22); white-space: nowrap; }
.eg-pill.pet { background: rgba(110, 190, 150, .12); border-color: rgba(110, 190, 150, .3); }
.eg-pill.gold { background: rgba(240, 200, 80, .15); }
.eg-drops { margin-top: 8px; font-size: .8rem; }
.eg-drops summary { cursor: pointer; color: #8ed7ff; }
.eg-drops ul { margin: 6px 0 0; padding-left: 1.05rem; color: var(--guide-muted); line-height: 1.5; }
.eg-drops li b { color: var(--guide-cream); font-weight: 600; }
.eg-drops .egg b { color: #ffb4a5; }

/* Simple key/value rewards for hand written events */
.eg-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.eg-kv div { padding: 10px 13px; border: 1px solid rgba(212, 175, 55, .2); border-radius: 8px; background: rgba(0, 0, 0, .22); }
.eg-kv strong { display: block; color: var(--guide-gold); font-size: 1rem; }
.eg-kv span { color: var(--guide-muted); font-size: .8rem; line-height: 1.4; }

.eg-empty { padding: 40px 20px; text-align: center; color: var(--guide-muted); }
.eg-top { position: fixed; right: 18px; bottom: 18px; width: 42px; height: 42px; display: none; place-items: center; color: #15110c; background: var(--guide-gold); border: 0; border-radius: 50%; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); cursor: pointer; z-index: 50; }
.eg-top.is-visible { display: grid; }
.eg-top svg { width: 19px; }

@media (max-width: 991px) {
    .eg-layout { grid-template-columns: 1fr; }
    .eg-toc { position: static; max-height: none; }
    .eg-basics ul { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .eg-head, .eg-badges, .eg-body { padding-left: 16px; padding-right: 16px; }
    .eg-stages thead { display: none; }
    .eg-stages, .eg-stages tbody, .eg-stages tr, .eg-stages td { display: block; width: 100%; }
    .eg-stages tr { padding: 10px 0; border-bottom: 1px solid rgba(212, 175, 55, .15); }
    .eg-stages td { padding: 4px 0; border: 0; }
    .eg-stages td::before { content: attr(data-label); display: block; color: var(--guide-muted); font: 700 .62rem "Cinzel", serif; letter-spacing: .1em; text-transform: uppercase; }
}
