/* /epoch — the timeline of ages and the page of a single age (desktop theme).
   Loaded only by pages/epoch.tpl.

   Every age carries its own colour through --age (an "r,g,b" triple), set by
   .epx-age--N on whatever element represents that age. Everything inside
   reads --age, so a card, a stop on the track or the whole detail page takes
   the colour of its age without a second rule. */

.epx {
    --age: var(--theme-color);
    --epx-ink: #f3f1ec;
    --epx-dim: rgba(243,241,236,0.62);
    --epx-faint: rgba(243,241,236,0.38);
    --epx-line: rgba(255,255,255,0.08);
    --epx-panel: rgba(255,255,255,0.028);
    padding: 34px 0 90px;
    color: var(--epx-dim);
    line-height: 1.5;
}
.epx-age--1 { --age: 224,140,58; }    /* Prehistoric — ember    */
.epx-age--2 { --age: 212,172,84; }    /* Ancient — bronze       */
.epx-age--3 { --age: 112,162,218; }   /* Medieval — steel       */
.epx-age--4 { --age: 168,134,236; }   /* Modern — violet        */
.epx-age--5 { --age: 66,206,190; }    /* Contemporary — teal    */

.epx h1, .epx h2, .epx h3 { color: var(--epx-ink); margin: 0; font-family: inherit; }
.epx p { margin: 0; }
.epx button { font: inherit; color: inherit; }
.epx a { text-decoration: none; }
html { scroll-padding-top: var(--epx-scroll-pad, 120px); }

.epx-eyebrow {
    display: flex; align-items: center; gap: 12px;
    font-size: 11.5px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase;
    color: rgb(var(--age));
}

/* ── Shared atoms ─────────────────────────────────────────────── */
.epx-status {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 10.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px; line-height: 1.2;
    border: 1px solid var(--epx-line); color: var(--epx-dim); background: rgba(0,0,0,0.25);
}
.epx-status i { font-size: 9px; }
.epx-status.is-current { color: rgb(var(--age)); border-color: rgba(var(--age),0.5); background: rgba(var(--age),0.1); }
.epx-status.is-current > i {
    width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--age));
    box-shadow: 0 0 0 0 rgba(var(--age),0.7); animation: epx-pulse 1.8s infinite;
}
.epx-status.is-past { color: #9fd3a8; border-color: rgba(120,200,140,0.28); }
.epx-status.is-ending { color: #f1c40f; border-color: rgba(241,196,15,0.4); background: rgba(241,196,15,0.08); }
@keyframes epx-pulse {
    70%  { box-shadow: 0 0 0 7px rgba(var(--age),0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--age),0); }
}

.epx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.epx-chip {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12.5px; color: var(--epx-dim); line-height: 1.2;
    padding: 7px 12px; border-radius: 8px;
    background: rgba(0,0,0,0.3); border: 1px solid var(--epx-line);
}
.epx-chip i { color: rgb(var(--age)); font-size: 11px; }
.epx-chip b { color: var(--epx-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.epx-chip.is-met { border-color: rgba(120,200,140,0.45); background: rgba(120,200,140,0.08); }
.epx-chip.is-met i { color: #8fd49c; }

.epx-bar {
    display: block; height: 6px; border-radius: 999px; overflow: hidden;
    background: rgba(255,255,255,0.07);
}
.epx-bar > i {
    display: block; height: 100%; border-radius: inherit;
    background: linear-gradient(90deg, rgba(var(--age),0.55), rgb(var(--age)));
}

.epx-btn {
    display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
    padding: 12px 20px; border-radius: 10px; font-size: 13.5px; font-weight: 700;
    color: #14110c !important; background: rgb(var(--age)); border: none;
    transition: filter .15s, transform .15s;
}
.epx-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }

.epx-void {
    text-align: center; padding: 70px 20px; border-radius: 16px;
    border: 1px dashed var(--epx-line); margin-top: 28px;
}
.epx-void i { font-size: 44px; color: rgba(var(--age),0.6); margin-bottom: 14px; display: block; }
.epx-void h3 { font-size: 20px; margin-bottom: 6px; }

/* ════════════════════════════ THE TIMELINE ════════════════════════════ */

.epx-lhero {
    position: relative; overflow: hidden; border-radius: 20px;
    padding: 64px 56px 0;
    border: 1px solid var(--epx-line);
    background:
        linear-gradient(180deg, rgba(10,11,15,0.2) 0%, rgba(10,11,15,0.82) 62%, #0b0c10 100%),
        var(--epx-banner, linear-gradient(120deg, #1a1210, #0d0f14)) center 30% / cover no-repeat,
        #0b0c10;
}
.epx-lhero-text { max-width: 760px; position: relative; }
.epx-lhero h1 { font-size: 46px; line-height: 1.08; font-weight: 800; letter-spacing: -0.5px; margin: 14px 0 16px; }
.epx-lhero-desc { font-size: 15.5px; line-height: 1.65; color: rgba(243,241,236,0.78); }
.epx-lhero-desc p { margin: 0 0 8px; }
.epx-lhero-desc a { color: rgb(var(--theme-color)); }
.epx-lhero-desc img { max-width: 100%; height: auto; border-radius: 6px; }

/* The track: stops on a line, the line filled up to the age in progress */
.epx-track {
    list-style: none; margin: 52px -56px 0; padding: 26px 56px 30px;
    display: grid; grid-template-columns: repeat(var(--epx-stops), 1fr);
    position: relative;
    background: rgba(0,0,0,0.42); border-top: 1px solid var(--epx-line);
}
.epx-track::before, .epx-track::after {
    content: ""; position: absolute; top: 45px; height: 2px;
    left: calc(56px + (100% - 112px) / var(--epx-stops) / 2);
}
.epx-track::before { width: calc((100% - 112px) / var(--epx-stops) * (var(--epx-stops) - 1)); background: rgba(255,255,255,0.1); }
.epx-track::after  { width: calc((100% - 112px) / var(--epx-stops) * var(--epx-at)); background: linear-gradient(90deg, rgba(255,255,255,0.25), rgba(255,255,255,0.6)); }
.epx-stop { position: relative; z-index: 1; text-align: center; }
.epx-stop a { display: flex; flex-direction: column; align-items: center; gap: 4px; color: inherit; }
.epx-stop-dot {
    width: 40px; height: 40px; border-radius: 50%; margin-bottom: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: var(--epx-faint);
    background: #14161c; border: 2px solid rgba(255,255,255,0.14);
    transition: transform .15s, border-color .15s;
}
.epx-stop-name { font-size: 13.5px; font-weight: 700; color: var(--epx-dim); }
.epx-stop-state { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--epx-faint); }
.epx-stop.is-past .epx-stop-dot { color: #0b0c10; background: rgba(243,241,236,0.75); border-color: transparent; font-size: 12px; }
.epx-stop.is-current .epx-stop-dot {
    color: #14110c; background: rgb(var(--age)); border-color: transparent;
    box-shadow: 0 0 0 6px rgba(var(--age),0.18), 0 0 26px rgba(var(--age),0.55);
}
.epx-stop.is-current .epx-stop-name { color: var(--epx-ink); }
.epx-stop.is-current .epx-stop-state { color: rgb(var(--age)); font-weight: 800; }
.epx-stop a:hover .epx-stop-dot { transform: scale(1.1); border-color: rgba(var(--age),0.8); }
.epx-stop a:hover .epx-stop-name { color: var(--epx-ink); }

/* One panel per age */
.epx-ages { display: flex; flex-direction: column; gap: 18px; margin-top: 26px; }
.epx-age {
    position: relative; display: grid; grid-template-columns: 132px minmax(0, 1fr) 360px;
    border-radius: 18px; overflow: hidden;
    background: linear-gradient(100deg, rgba(var(--age),0.07) 0%, rgba(255,255,255,0.022) 38%);
    border: 1px solid var(--epx-line);
    transition: border-color .18s, transform .18s, box-shadow .18s;
}
.epx-age-link { position: absolute; inset: 0; z-index: 3; }
.epx-age:hover { border-color: rgba(var(--age),0.55); transform: translateY(-2px); box-shadow: 0 18px 44px rgba(0,0,0,0.45); }
.epx-age.is-current { border-color: rgba(var(--age),0.6); box-shadow: 0 0 0 1px rgba(var(--age),0.25), 0 0 60px rgba(var(--age),0.12); }

.epx-age-side {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    padding: 28px 0; border-right: 1px solid var(--epx-line);
    background: linear-gradient(180deg, rgba(var(--age),0.2), rgba(var(--age),0.04));
}
.epx-age-num { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: 1px; color: rgb(var(--age)); font-family: Georgia, 'Times New Roman', serif; }
.epx-age-ico { font-size: 20px; color: rgba(var(--age),0.75); }

.epx-age-main { padding: 28px 30px; min-width: 0; }
.epx-age-top { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.epx-age h2 { font-size: 28px; font-weight: 800; line-height: 1.15; margin-bottom: 14px; letter-spacing: -0.2px; }
.epx-age-desc { margin-top: 14px; font-size: 14px; line-height: 1.6; max-width: 640px; }

.epx-counts { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 30px; }
.epx-counts li { display: flex; flex-direction: column; gap: 3px; padding: 4px 0; }
.epx-counts b { font-size: 22px; font-weight: 800; color: var(--epx-ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.epx-counts span { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--epx-faint); }

.epx-goal {
    margin-top: 22px; padding: 14px 16px; border-radius: 12px; max-width: 640px;
    background: rgba(0,0,0,0.32); border: 1px solid rgba(var(--age),0.28);
}
.epx-goal-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; margin-bottom: 9px; }
.epx-goal-head span { font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: rgb(var(--age)); }
.epx-goal-head span i { margin-right: 7px; }
.epx-goal-head b { color: var(--epx-ink); font-variant-numeric: tabular-nums; }
.epx-goal p { margin-top: 9px; font-size: 13.5px; color: var(--epx-ink); }

.epx-age-peek {
    display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
    padding: 24px 26px; border-left: 1px solid var(--epx-line); background: rgba(0,0,0,0.22);
}
.epx-peek-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.epx-peek-grid figure {
    margin: 0; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 60%, rgba(var(--age),0.16), rgba(255,255,255,0.03) 70%);
    border: 1px solid var(--epx-line);
}
.epx-peek-grid img { max-width: 84%; max-height: 84%; object-fit: contain; }
.epx-peek-more { font-size: 15px; font-weight: 800; color: var(--epx-dim); }
.epx-age.is-upcoming .epx-peek-grid img { filter: grayscale(1) brightness(0.75); opacity: 0.75; }
.epx-age.is-upcoming:hover .epx-peek-grid img { filter: none; opacity: 1; }
.epx-age-cta {
    align-self: flex-end; display: inline-flex; align-items: center; gap: 9px;
    font-size: 12.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: rgb(var(--age));
}
.epx-age-cta i { transition: transform .18s; }
.epx-age:hover .epx-age-cta i { transform: translateX(5px); }

/* ════════════════════════════ ONE AGE ════════════════════════════ */

.epx-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.epx-steps-all, .epx-step {
    display: inline-flex; align-items: center; gap: 9px; line-height: 1.2;
    padding: 8px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
    color: var(--epx-dim); border: 1px solid var(--epx-line); background: var(--epx-panel);
    transition: color .15s, border-color .15s, background .15s;
}
.epx-steps-all { margin-right: 8px; border-color: transparent; background: transparent; padding-left: 4px; }
.epx-steps-all:hover { color: var(--epx-ink); }
.epx-step-num { font-family: Georgia, 'Times New Roman', serif; font-weight: 800; color: rgb(var(--age)); }
.epx-step:hover { color: var(--epx-ink); border-color: rgba(var(--age),0.5); }
.epx-step.is-here { color: #14110c; background: rgb(var(--age)); border-color: transparent; font-weight: 800; }
.epx-step.is-here .epx-step-num { color: #14110c; }

.epx-hero {
    position: relative; overflow: hidden; border-radius: 20px;
    display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: end;
    padding: 54px 52px 48px;
    border: 1px solid rgba(var(--age),0.3);
    background:
        linear-gradient(95deg, #0b0c10 0%, rgba(11,12,16,0.9) 46%, rgba(11,12,16,0.55) 100%),
        var(--epx-banner, none) center / cover no-repeat,
        radial-gradient(900px 420px at 88% 0%, rgba(var(--age),0.28), transparent 70%),
        #0b0c10;
}
/* No banner uploaded: the first map of the age, large and faint, as art */
.epx-hero::after {
    content: ""; position: absolute; right: -40px; top: -30px; width: 620px; height: 130%;
    background: var(--epx-art, none) center / contain no-repeat;
    opacity: 0.2; filter: blur(1px) saturate(1.2); pointer-events: none;
    -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent 100%);
            mask-image: radial-gradient(closest-side, #000 40%, transparent 100%);
}
.epx-hero > * { position: relative; z-index: 1; }
.epx-hero h1 { font-size: 52px; font-weight: 800; line-height: 1.05; letter-spacing: -0.8px; margin: 16px 0 16px; }
.epx-hero h1 i { font-size: 0.62em; margin-right: 16px; color: rgb(var(--age)); vertical-align: 0.12em; }
.epx-hero-desc { font-size: 16px; line-height: 1.65; color: rgba(243,241,236,0.8); max-width: 620px; margin-bottom: 22px !important; }
.epx-note {
    display: flex; gap: 12px; align-items: baseline; margin-top: 16px; max-width: 620px;
    padding: 12px 16px; border-radius: 10px; font-size: 13.5px; color: var(--epx-ink);
    background: rgba(var(--age),0.09); border: 1px solid rgba(var(--age),0.3);
}
.epx-note i { color: rgb(var(--age)); }
.epx-note b { font-weight: 700; }
.epx-note.is-ending { background: rgba(241,196,15,0.08); border-color: rgba(241,196,15,0.35); }
.epx-note.is-ending i { color: #f1c40f; }

.epx-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.epx-hero-stats a {
    display: flex; flex-direction: column; gap: 5px; padding: 16px 14px;
    border-radius: 12px; background: rgba(0,0,0,0.42); border: 1px solid var(--epx-line);
    backdrop-filter: blur(6px); transition: border-color .15s, transform .15s;
}
.epx-hero-stats a:hover { border-color: rgba(var(--age),0.6); transform: translateY(-2px); }
.epx-hero-stats b { font-size: 26px; font-weight: 800; line-height: 1; color: var(--epx-ink); font-variant-numeric: tabular-nums; }
.epx-hero-stats span { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--epx-faint); }

/* Section nav — sticks under whatever the site pins to the top (js/epoch.js) */
.epx-nav { position: sticky; top: 0; z-index: 900; margin: 18px 0 0; }
.epx-nav-in {
    display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 6px;
    border-radius: 14px; border: 1px solid var(--epx-line);
    background: rgba(13,14,19,0.86); backdrop-filter: blur(12px);
}
.epx-nav-in::-webkit-scrollbar { display: none; }
.epx-nav.is-stuck .epx-nav-in { border-radius: 0 0 14px 14px; box-shadow: 0 14px 30px rgba(0,0,0,0.5); }
.epx-nav a {
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; line-height: 1.2;
    padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--epx-dim);
    transition: color .15s, background .15s;
}
.epx-nav a i { font-size: 12px; color: var(--epx-faint); transition: color .15s; }
.epx-nav a:hover { color: var(--epx-ink); background: rgba(255,255,255,0.05); }
.epx-nav a.is-active { color: var(--epx-ink); background: rgba(var(--age),0.16); }
.epx-nav a.is-active i { color: rgb(var(--age)); }

/* Sections */
.epx-sec { margin-top: 64px; }
.epx-sec-head { margin-bottom: 22px; }
.epx-sec-head.has-tool { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.epx-sec-head h2 { font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -0.3px; display: flex; align-items: center; gap: 14px; }
.epx-sec-head h2::before { content: ""; width: 5px; height: 26px; border-radius: 3px; background: rgb(var(--age)); }
.epx-sec-head p { margin-top: 6px; font-size: 14px; padding-left: 19px; }

.epx-group + .epx-group { margin-top: 26px; }
.epx-group-title {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px !important;
    font-size: 11.5px !important; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
    color: rgb(var(--age)) !important;
}
.epx-group-title span { font-size: 10.5px; letter-spacing: 0; color: var(--epx-faint); font-weight: 700; }
.epx-group-title::after { content: ""; flex: 1; height: 1px; background: var(--epx-line); }

/* Classes */
.epx-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.epx-class {
    position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 196px;
    padding: 18px 18px 16px; border-radius: 14px;
    background: var(--epx-panel); border: 1px solid var(--epx-line);
    transition: border-color .15s;
}
.epx-class:hover { border-color: rgba(var(--age),0.45); }
.epx-class-art {
    position: absolute; right: -14px; top: -6px; height: 118%; width: auto; max-width: none;
    opacity: 0.5; pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
    transition: opacity .2s;
}
.epx-class:hover .epx-class-art { opacity: 0.85; }
.epx-class > *:not(.epx-class-art) { position: relative; z-index: 1; }
.epx-class-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.epx-class-ico {
    width: 42px; height: 42px; flex: none; border-radius: 10px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.45); border: 1px solid var(--epx-line);
}
.epx-class-ico img { width: 100%; height: 100%; object-fit: cover; }
.epx-class-head h3 { font-size: 16px; font-weight: 800; line-height: 1.2; }
.epx-class-head span { font-size: 12px; color: rgb(var(--age)); font-weight: 600; }
.epx-class-steps { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 74%; }
.epx-class-steps li {
    display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px;
    background: rgba(8,9,12,0.72); border: 1px solid var(--epx-line);
}
.epx-step-ico { width: 24px; height: 24px; flex: none; display: flex; align-items: center; justify-content: center; color: rgb(var(--age)); font-size: 11px; }
.epx-step-ico img { width: 24px; height: 24px; border-radius: 5px; object-fit: cover; }
.epx-step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.epx-step-body b { font-size: 12.5px; color: var(--epx-ink); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epx-step-body small { font-size: 10.5px; color: var(--epx-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epx-step-req { font-size: 10.5px; font-weight: 800; color: var(--epx-ink); white-space: nowrap; padding: 3px 7px; border-radius: 6px; background: rgba(var(--age),0.18); }
.epx-class-btn {
    margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 8px 12px; border-radius: 9px; font-size: 12px; font-weight: 700;
    background: rgba(8,9,12,0.72); border: 1px solid rgba(var(--age),0.35); color: var(--epx-ink) !important;
    transition: background .15s, border-color .15s;
}
.epx-class-btn i { color: rgb(var(--age)); font-size: 11px; }
.epx-class-btn b { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: rgba(var(--age),0.22); }
.epx-class-btn:hover { background: rgba(var(--age),0.18); border-color: rgb(var(--age)); }

/* Maps */
.epx-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.epx-map {
    position: relative; display: flex; flex-direction: column; align-items: stretch; cursor: pointer; text-align: left;
    padding: 0; border-radius: 14px; overflow: hidden;
    background: var(--epx-panel); border: 1px solid var(--epx-line);
    transition: border-color .15s, transform .15s;
}
.epx-map:hover { border-color: rgba(var(--age),0.6); transform: translateY(-3px); }
.epx-map-img {
    height: 128px; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 65%, rgba(var(--age),0.2), transparent 68%), rgba(0,0,0,0.3);
    font-size: 30px; color: rgba(var(--age),0.5);
}
.epx-map-img img { max-width: 78%; max-height: 82%; object-fit: contain; transition: transform .25s; filter: drop-shadow(0 8px 14px rgba(0,0,0,0.6)); }
.epx-map:hover .epx-map-img img { transform: scale(1.08); }
.epx-map-name { padding: 12px 14px 13px; font-size: 14px; font-weight: 700; color: var(--epx-ink); line-height: 1.25; border-top: 1px solid var(--epx-line); }
.epx-map-zones {
    position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase;
    padding: 3px 8px; border-radius: 999px; color: #14110c; background: rgb(var(--age));
}
.epx-map-note { padding: 0 14px 12px; margin-top: -6px; font-size: 11.5px; font-style: italic; }

/* Bosses */
.epx-bosses { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.epx-boss {
    display: flex; align-items: center; gap: 16px; cursor: pointer; text-align: left;
    padding: 14px 18px 14px 14px; border-radius: 14px;
    background: var(--epx-panel); border: 1px solid var(--epx-line);
    transition: border-color .15s, transform .15s;
}
.epx-boss:hover { border-color: rgba(var(--age),0.6); transform: translateY(-3px); }
.epx-boss-img {
    width: 92px; height: 92px; flex: none; border-radius: 12px; overflow: hidden;
    display: flex; align-items: center; justify-content: center; font-size: 30px; color: rgba(var(--age),0.5);
    background: radial-gradient(circle at 50% 70%, rgba(var(--age),0.24), rgba(0,0,0,0.4) 72%);
    border: 1px solid var(--epx-line);
}
.epx-boss-img img { max-width: 92%; max-height: 92%; object-fit: contain; }
.epx-boss-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.epx-boss-name { font-size: 16px; font-weight: 800; color: var(--epx-ink); line-height: 1.2; }
.epx-boss-meta { display: flex; gap: 14px; font-size: 12px; color: var(--epx-faint); }
.epx-boss-meta b { color: var(--epx-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.epx-boss-note { font-size: 11.5px; font-style: italic; }

/* Events / systems */
.epx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.epx-card {
    display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%;
    padding: 16px; border-radius: 14px;
    background: var(--epx-panel); border: 1px solid var(--epx-line);
    transition: border-color .15s, transform .15s;
}
.epx-card.is-action { cursor: pointer; }
.epx-card.is-action:hover { border-color: rgba(var(--age),0.6); transform: translateY(-2px); }
.epx-card-ico {
    width: 42px; height: 42px; flex: none; border-radius: 11px;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
    color: rgb(var(--age)); background: rgba(var(--age),0.12); border: 1px solid rgba(var(--age),0.25);
}
.epx-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.epx-card-name { font-size: 15px; font-weight: 800; color: var(--epx-ink); line-height: 1.25; }
.epx-card-desc { font-size: 12.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.epx-card-cta { font-size: 11.5px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: rgb(var(--age)); }
.epx-card-cta i { margin-right: 7px; }
.epx-tiers, .epx-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.epx-tiers i {
    font-style: normal; min-width: 24px; text-align: center; font-size: 11.5px; font-weight: 800;
    padding: 2px 7px; border-radius: 6px; color: #14110c; background: rgb(var(--age));
}
.epx-tags i {
    font-style: normal; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
    color: rgb(var(--age)); background: rgba(var(--age),0.1); border: 1px solid rgba(var(--age),0.28);
}

/* Gear */
.epx-gear {
    display: flex; align-items: center; gap: 30px; flex-wrap: wrap;
    padding: 24px 26px; border-radius: 16px;
    background: linear-gradient(100deg, rgba(var(--age),0.09), rgba(255,255,255,0.02) 60%);
    border: 1px solid var(--epx-line);
}
.epx-gear-counts { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.epx-gear-counts li { display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: center; }
.epx-gear-counts i { grid-row: span 2; font-size: 20px; color: rgb(var(--age)); width: 26px; text-align: center; }
.epx-gear-counts b { font-size: 22px; font-weight: 800; line-height: 1.1; color: var(--epx-ink); font-variant-numeric: tabular-nums; }
.epx-gear-counts span { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--epx-faint); }
.epx-gear-strip {
    flex: 1; min-width: 200px; display: flex; gap: 8px; overflow: hidden; align-items: center; justify-content: flex-end;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%);
            mask-image: linear-gradient(90deg, transparent, #000 30%);
}
.epx-gear-strip img { height: 46px; width: auto; max-width: 46px; object-fit: contain; flex: none; opacity: 0.85; }

/* Shops */
.epx-search {
    display: flex; align-items: center; gap: 9px; margin: 0; width: 280px;
    padding: 10px 14px; border-radius: 10px; background: rgba(0,0,0,0.35); border: 1px solid var(--epx-line);
}
.epx-search:focus-within { border-color: rgba(var(--age),0.6); }
.epx-search i { font-size: 12px; color: var(--epx-faint); }
.epx-search input { flex: 1; min-width: 0; height: auto; padding: 0; background: transparent; border: none; outline: none; color: var(--epx-ink); font-size: 13px; }
.epx-search input::placeholder { color: var(--epx-faint); }
.epx-shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.epx-shop {
    display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left;
    padding: 10px 14px 10px 10px; border-radius: 12px;
    background: var(--epx-panel); border: 1px solid var(--epx-line);
    transition: border-color .15s, background .15s;
}
.epx-shop:hover { border-color: rgba(var(--age),0.55); background: rgba(var(--age),0.06); }
.epx-shop-img {
    width: 44px; height: 44px; flex: none; border-radius: 10px; overflow: hidden;
    display: flex; align-items: center; justify-content: center; color: var(--epx-faint);
    background: rgba(0,0,0,0.4);
}
.epx-shop-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.epx-shop-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.epx-shop-body b { font-size: 13.5px; font-weight: 700; color: var(--epx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epx-shop-body small { font-size: 11.5px; color: var(--epx-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epx-shop-body small i { margin-right: 6px; color: rgba(var(--age),0.8); font-size: 10px; }
.epx-shops-none { grid-column: 1 / -1; text-align: center; padding: 26px; font-style: italic; color: var(--epx-faint); }

/* Tournaments */
.epx-tours { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.epx-tour {
    position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
    min-height: 168px; padding: 20px 22px; border-radius: 16px;
    background-color: #111318; background-size: cover; background-position: center;
    border: 1px solid var(--epx-line); color: var(--epx-ink) !important;
    transition: border-color .15s, transform .15s;
}
.epx-tour::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,9,12,0.1) 0%, rgba(8,9,12,0.92) 88%); }
.epx-tour.is-plain { background-image: radial-gradient(500px 200px at 90% 0%, rgba(var(--age),0.3), transparent 70%); }
.epx-tour > * { position: relative; }
.epx-tour:hover { border-color: rgba(var(--age),0.65); transform: translateY(-3px); }
.epx-tour-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.epx-tour-body b { font-size: 19px; font-weight: 800; line-height: 1.2; }
.epx-tour-body small { font-size: 12.5px; color: var(--epx-dim); line-height: 1.5; }
.epx-tour > i { color: rgb(var(--age)); font-size: 16px; margin-bottom: 4px; transition: transform .18s; }
.epx-tour:hover > i { transform: translateX(5px); }

/* Pager */
.epx-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 72px; }
.epx-pager a {
    display: flex; align-items: center; gap: 18px; padding: 22px 26px; border-radius: 16px;
    background: linear-gradient(100deg, rgba(var(--age),0.1), rgba(255,255,255,0.02));
    border: 1px solid var(--epx-line); transition: border-color .15s, transform .15s;
}
.epx-pager a:hover { border-color: rgba(var(--age),0.65); transform: translateY(-2px); }
.epx-pager-next { justify-content: flex-end; text-align: right; grid-column: 2; }
.epx-pager a > i { color: rgb(var(--age)); font-size: 18px; }
.epx-pager span { display: flex; flex-direction: column; gap: 3px; }
.epx-pager small { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: rgb(var(--age)); font-weight: 700; }
.epx-pager b { font-size: 20px; font-weight: 800; color: var(--epx-ink); line-height: 1.2; }

/* Narrower desktop windows — the phone layout is the Mobile theme's own file */
@media (max-width: 1199px) {
    .epx-age { grid-template-columns: 100px minmax(0, 1fr); }
    .epx-age-peek { grid-column: 1 / -1; flex-direction: row; align-items: center; border-left: none; border-top: 1px solid var(--epx-line); }
    .epx-peek-grid { grid-template-columns: repeat(6, 72px); }
    .epx-hero { grid-template-columns: 1fr; padding: 40px 36px; }
    .epx-hero h1 { font-size: 42px; }
    .epx-hero-stats { grid-template-columns: repeat(6, 1fr); }
    .epx-lhero { padding: 44px 36px 0; }
    .epx-track { margin: 40px -36px 0; padding-left: 36px; padding-right: 36px; }
    .epx-track::before, .epx-track::after { left: calc(36px + (100% - 72px) / var(--epx-stops) / 2); }
    .epx-track::before { width: calc((100% - 72px) / var(--epx-stops) * (var(--epx-stops) - 1)); }
    .epx-track::after  { width: calc((100% - 72px) / var(--epx-stops) * var(--epx-at)); }
}
@media (prefers-reduced-motion: reduce) {
    .epx *, .epx *::before, .epx *::after { animation: none !important; transition: none !important; }
}

/* ════ Modals and their content — carried over unchanged ════ */
/* ── Items modal ─────────────────────────────────────────────── */
/* Above the sticky header (1000), its mega-menu (9999 !important) and
   jQuery UI's .ui-front (1000000). */
.ep-modal-back {
    position: fixed; inset: 0; z-index: 1000050;
    background: rgba(4,6,10,0.78); backdrop-filter: blur(3px);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.ep-modal-back.open { display: flex; }
.ep-modal {
    width: 100%; max-width: 900px; max-height: 86vh; display: flex; flex-direction: column;
    background: linear-gradient(180deg, #101114, #0a0a0c);
    border: 1px solid rgba(255,255,255,0.09); border-radius: 12px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.7);
}
.ep-modal-head {
    display: flex; align-items: center; gap: 10px; padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ep-modal-head h3 {
    margin: 0; flex: 1; color: #fff; font-size: 16px; font-weight: 700;
    display: flex; align-items: center; gap: 9px;
}
.ep-modal-head h3 i { color: rgb(var(--theme-color)); font-size: 14px; }
.ep-modal-x {
    background: transparent; border: none; color: rgba(255,255,255,0.4);
    cursor: pointer; font-size: 16px; padding: 4px 8px; border-radius: 6px;
}
.ep-modal-x:hover { color: #fff; background: rgba(255,255,255,0.08); }
.ep-modal-body { overflow-y: auto; padding: 16px 18px 20px; }

.ep-ig + .ep-ig { margin-top: 20px; }
.ep-ig-head {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
    color: rgba(255,255,255,0.75); font-size: 12.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
}
.ep-ig-head i { color: rgb(var(--theme-color)); font-size: 12px; }
.ep-ig-n {
    font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.07); border-radius: 9px; padding: 1px 7px;
    text-transform: none; letter-spacing: 0;
}
/* Image-only tiles; the name lives in the hover tooltip */
.ep-igrid {
    display: grid; gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
}
.ep-itile {
    position: relative; aspect-ratio: 1 / 1;
    display: flex; align-items: center; justify-content: center; padding: 6px;
    background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px; cursor: help;
    transition: border-color .14s, background .14s, transform .14s;
}
.ep-itile:hover {
    border-color: rgba(var(--theme-color), 0.6);
    background: rgba(var(--theme-color), 0.08);
    transform: translateY(-1px);
}
.ep-itile img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ep-itile i { color: rgba(255,255,255,0.2); font-size: 14px; }

/* One card per armour set: its 5 pieces, each independently hoverable */
.ep-sgrid {
    display: grid; gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.ep-scard {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 9px; padding: 10px;
}
.ep-scard-head { display: flex; align-items: baseline; margin-bottom: 8px; }
.ep-scard-name {
    flex: 1; min-width: 0; color: #fff; font-size: 12.5px; font-weight: 700;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ep-scard-pieces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.ep-scard-pieces .ep-itile { aspect-ratio: 1 / 1; padding: 4px; }
.ep-itile.miss { opacity: 0.25; cursor: default; border-style: dashed; }
.ep-itile.miss:hover { transform: none; border-color: rgba(255,255,255,0.06); background: rgba(255,255,255,0.035); }

.ep-im-empty { color: #8b90a0; font-size: 12.5px; text-align: center; padding: 24px; font-style: italic; }
/* Shop items — the MU 8×16 shop box (same as admin), items packed by W×H */
.ep-shop-igrid {
    display: grid; grid-template-columns: repeat(8, 24px); grid-auto-rows: 24px;
    gap: 1px; padding: 4px; width: max-content; margin: 0 auto;
    background: #0a0b0e; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
}
.ep-shop-icell { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.04); border-radius: 3px; }
.ep-shop-iitem {
    position: relative; display: flex; align-items: center; justify-content: center; padding: 2px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px; cursor: help; overflow: hidden;
    transition: border-color .12s, background .12s;
}
.ep-shop-iitem:hover { border-color: rgba(var(--theme-color), 0.6); background: rgba(var(--theme-color), 0.12); z-index: 1; }
.ep-shop-iitem.exc { border-color: rgba(111,224,138,0.4); }
.ep-shop-iitem img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ep-shop-icode { font-size: 8px; color: rgba(255,255,255,0.4); text-align: center; line-height: 1.1; }
.ep-itile-lv {
    position: absolute; bottom: 0; right: 0;
    font-size: 7px; font-weight: 800; line-height: 1;
    color: #fff; background: rgba(0,0,0,0.7);
    border-radius: 2px 0 0 0; padding: 1px 2px;
}
.ep-shop-over { text-align: center; color: rgba(255,255,255,0.4); font-size: 11px; margin-top: 10px; font-style: italic; }

/* Map detail modal */
.ep-map-modal { max-width: 860px; }
.ep-map-cols { display: flex; gap: 16px; flex-wrap: wrap; }
.ep-map-photo { flex: 1 1 340px; min-width: 0; }
.ep-map-photo img {
    width: 100%; border-radius: 10px; border: 1px solid rgba(255,255,255,0.08);
    display: block; background: #0a0b0e;
}
.ep-map-mini { flex: 0 0 300px; }
.ep-map-mini-title, .ep-map-desc-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: rgba(255,255,255,0.5); margin-bottom: 8px;
}
.ep-map-canvas-wrap {
    position: relative; width: 300px; max-width: 100%;
    border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); background: #0a0b0e;
}
#ep-map-canvas { display: block; width: 100%; height: auto; cursor: crosshair; border-radius: 9px; }
.ep-map-tip {
    position: absolute; pointer-events: none; z-index: 1000070; display: none;
    background: rgba(8,10,14,0.95); color: #fff; font-size: 11px; font-weight: 600;
    border: 1px solid rgba(var(--theme-color), 0.5); border-radius: 6px; padding: 3px 7px;
    white-space: nowrap; transform: translate(-50%, -130%);
}
.ep-map-legend { margin-top: 8px; font-size: 10.5px; color: rgba(255,255,255,0.4); }
.ep-map-legend b { color: rgb(var(--theme-color)); font-weight: 700; }
.ep-map-desc { margin-top: 16px; }
.ep-map-desc-text { color: rgba(255,255,255,0.75); font-size: 13px; line-height: 1.6; }
.ep-map-desc-none { color: rgba(255,255,255,0.35); font-size: 12.5px; font-style: italic; }
.ep-map-desc-title i { color: rgb(var(--theme-color)); margin-right: 5px; }
.ep-map-sec { margin-top: 18px; }

/* Monsters on the map */
.ep-mon-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ep-mon-card {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px;
}
.ep-mon-img { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; }
.ep-mon-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ep-mon-img i { color: rgba(255,255,255,0.25); font-size: 16px; }
.ep-mon-body { flex: 1; min-width: 0; }
.ep-mon-name { color: #fff; font-size: 12.5px; font-weight: 700; line-height: 1.2;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-mon-tag { font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px;
    border-radius: 3px; padding: 1px 4px; margin-left: 6px; vertical-align: 1px; }
.ep-mon-tag.boss { color: #0d1017; background: #f43f5e; }
.ep-mon-tag.elite { color: #0d1017; background: #f0c04a; }
.ep-mon-stats { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 4px; font-size: 10.5px; color: rgba(255,255,255,0.5); }
.ep-mon-stats b { color: rgba(255,255,255,0.9); font-weight: 700; }

/* NPCs on the map */
.ep-npc-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ep-npc-card {
    display: flex; align-items: center; gap: 10px; padding: 7px 10px;
    background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px;
}
.ep-npc-img { width: 38px; height: 38px; flex: none; display: flex; align-items: center; justify-content: center; }
.ep-npc-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ep-npc-img i { color: rgba(255,255,255,0.25); font-size: 14px; }
.ep-npc-body { flex: 1; min-width: 0; }
.ep-npc-name { color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.2;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-npc-shop { font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
    color: rgb(var(--theme-color)); background: rgba(var(--theme-color),0.14);
    border: 1px solid rgba(var(--theme-color),0.3); border-radius: 3px; padding: 1px 5px; margin-left: 6px; }
.ep-npc-shop i { font-size: 8px; margin-right: 2px; }
.ep-npc-loc { color: rgba(255,255,255,0.5); font-size: 10.5px; margin-top: 3px; }
.ep-npc-loc i { color: rgb(var(--theme-color)); font-size: 9px; margin-right: 3px; }

/* Boss detail modal */
.ep-boss-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.ep-boss-portrait {
    width: 96px; height: 96px; flex: none; border-radius: 12px;
    background: #0a0b0e; border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ep-boss-portrait img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ep-boss-portrait i { color: rgba(255,255,255,0.25); font-size: 34px; }
.ep-boss-hero-body { min-width: 0; }
.ep-boss-hname { color: #fff; font-size: 20px; font-weight: 800; line-height: 1.15; }
.ep-boss-badges { display: flex; gap: 6px; margin-top: 6px; }
.ep-boss-badge { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; border-radius: 4px; padding: 2px 7px; }
.ep-boss-badge.boss { color: #0d1017; background: #f43f5e; }
.ep-boss-badge.elite { color: #0d1017; background: #f0c04a; }
.ep-boss-badge.lv { color: rgb(var(--theme-color)); background: rgba(var(--theme-color),0.14); border: 1px solid rgba(var(--theme-color),0.3); }

.ep-boss-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.ep-boss-stat {
    background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px; padding: 8px 11px;
}
.ep-boss-stat-k { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: rgba(255,255,255,0.4); }
.ep-boss-stat-v { color: #fff; font-size: 14px; font-weight: 700; margin-top: 2px; }

.ep-boss-list { display: flex; flex-direction: column; gap: 6px; }
.ep-boss-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px; padding: 8px 11px;
}
.ep-boss-row-map { color: #fff; font-size: 12.5px; font-weight: 700; }
.ep-boss-row-loc { color: rgba(255,255,255,0.5); font-size: 11px; }
.ep-boss-row-loc i { color: rgb(var(--theme-color)); font-size: 9px; margin-right: 3px; }
.ep-boss-sched { display: flex; flex-wrap: wrap; gap: 5px; margin-left: auto; }
.ep-boss-time {
    font-size: 10.5px; font-weight: 700; white-space: nowrap;
    color: rgb(var(--theme-color)); background: rgba(var(--theme-color),0.12);
    border: 1px solid rgba(var(--theme-color),0.3); border-radius: 5px; padding: 2px 7px;
}
.ep-boss-time em { font-style: normal; color: rgba(255,255,255,0.5); font-weight: 500; margin-left: 3px; }
.ep-boss-regen {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(var(--theme-color),0.08); border: 1px solid rgba(var(--theme-color),0.25);
    border-radius: 8px; padding: 8px 14px; color: #fff; font-size: 14px; font-weight: 700;
}
.ep-boss-regen i { color: rgb(var(--theme-color)); }
.ep-boss-none { color: rgba(255,255,255,0.35); font-size: 12px; font-style: italic; }
@media (max-width: 640px) { .ep-map-mini { flex-basis: 100%; } .ep-map-canvas-wrap { width: 100%; max-width: 320px; margin: 0 auto; } }

@media (max-width: 520px) {
    .ep-igrid { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
    .ep-sgrid { grid-template-columns: 1fr; }
    .ep-shop-grid { grid-template-columns: 1fr; }
}
.ep-ev-levels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.ep-ev-level {
    font-size: 10px; font-weight: 600; color: rgb(var(--theme-color));
    background: rgba(var(--theme-color), 0.1); border: 1px solid rgba(var(--theme-color), 0.28);
    border-radius: 5px; padding: 1px 6px; white-space: nowrap;
}
.ep-box-intro { color: rgba(255,255,255,0.55); font-size: 12.5px; margin-bottom: 12px; }
.ep-box-search {
    display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
    background: #0d1017; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 8px 12px;
}
.ep-box-search:focus-within { border-color: rgba(var(--theme-color), 0.55); }
.ep-box-search i { color: rgba(255,255,255,0.35); font-size: 12px; }
.ep-box-search input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: #fff; font-size: 13px; }
.ep-box-search input::placeholder { color: rgba(255,255,255,0.35); }

/* Page-level refinements */
.epx-card-cat { font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(var(--age),0.9); line-height: 1.2; }
.epx-age.is-upcoming .epx-peek-grid img { filter: grayscale(0.85); opacity: 0.9; }
.epx-peek-grid img, .epx-map-img img { filter: brightness(1.35) drop-shadow(0 8px 14px rgba(0,0,0,0.6)); }
.epx-age.is-upcoming .epx-peek-grid img { filter: grayscale(0.85) brightness(1.5); }

/* Tier chips: the tier number, then the character levels it accepts */
.epx-tiers { gap: 6px; }
.epx-tiers > span {
    display: inline-flex; align-items: stretch; overflow: hidden; border-radius: 7px; line-height: 1.2;
    border: 1px solid rgba(var(--age),0.4); background: rgba(var(--age),0.08);
}
.epx-tiers > span > i { border-radius: 0; padding: 4px 8px; min-width: 26px; }
.epx-tiers > span > b { padding: 4px 9px; font-size: 11.5px; font-weight: 700; color: var(--epx-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
