/* Shared Emerald Peaks navigation, consistent across every page. */
.ep-topbar{position:sticky;top:0;z-index:40;background:#081610f5;border-bottom:1px solid #c4a06875;box-shadow:0 5px 25px #0009;backdrop-filter:blur(12px)}
.ep-topinside{max-width:1440px;margin:auto;min-height:78px;display:flex;align-items:center;gap:20px;padding:0 24px}
.ep-brand{display:flex;align-items:center;gap:12px;text-decoration:none;white-space:nowrap;flex-shrink:0}
.ep-emerald{display:grid;place-items:center;width:40px;height:40px;border:2px solid #d9b878;border-radius:8px;transform:rotate(45deg);background:radial-gradient(circle at 38% 35%,#9bfbc5 0%,#2cce86 22%,#09643b 61%,#052a1d 100%);box-shadow:0 0 8px #20d77a55,inset 0 0 12px #baffca66;animation:ep-gem-breathe 7.5s ease-in-out infinite}
.ep-emerald span{transform:rotate(-45deg);color:#d5ffe4;text-shadow:0 0 12px #8bffc3}
.ep-brandstrong{position:relative;display:inline-block;font:600 21px/1.2 Cinzel,Georgia,serif;color:#e9c486;background:linear-gradient(105deg,#d5a554 0%,#f7dc9b 25%,#fff6d8 45%,#d1a052 62%,#efd18f 100%);background-size:220% 100%;background-position:0 50%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.ep-brandstrong::after{content:'Emerald Peaks';display:block;color:transparent;-webkit-text-fill-color:transparent;pointer-events:none;position:absolute;inset:0;background:linear-gradient(105deg,transparent 30%,#ffffff00 43%,#fff7c9c9 51%,#ffe1a333 56%,transparent 69%);background-size:150% 100%;background-position:170% 50%;-webkit-background-clip:text;background-clip:text;animation:ep-brand-shine 9s ease-in-out infinite}
.ep-brandtiny{display:block;font:10px/1.6 'DM Sans',Arial,sans-serif;letter-spacing:1.9px;color:#c5a36d;margin-top:3px}
.ep-nav{display:flex;align-items:center;gap:2px;margin-left:auto;min-width:0}
.ep-nav a,.ep-mobilelinks a{font:700 11px 'DM Sans',Arial,sans-serif;color:#e5dcc6;text-decoration:none;border-radius:6px;white-space:nowrap}
.ep-nav a{padding:11px 8px}.ep-nav a:hover,.ep-nav a[aria-current="page"]{background:#224b35;color:#f6d99a}
.ep-actions{display:flex;align-items:center;gap:8px}.ep-action{border:1px solid #bfa16e;border-radius:7px;background:#173323;color:#f5ddb0;padding:10px 12px;cursor:pointer;font:700 12px 'DM Sans',sans-serif;white-space:nowrap}
.ep-mobilemenu{display:none;margin-left:auto;border:1px solid #a48654;background:#102b1d;color:#eed9a9;border-radius:7px;padding:8px 11px;cursor:pointer}
.ep-mobilelinks{display:none;background:#0c261a;border-top:1px solid #7d6c4691;padding:10px 18px;max-height:65vh;overflow:auto}.ep-mobilelinks a{display:block;padding:12px 10px}
@keyframes ep-brand-shine{0%,60%{background-position:170% 50%;opacity:0}68%{opacity:1}81%{background-position:-80% 50%;opacity:1}86%,100%{background-position:-80% 50%;opacity:0}}
@keyframes ep-gem-breathe{0%,100%{box-shadow:0 0 7px #29d58444,inset 0 0 11px #baffca55;filter:brightness(.94)}45%{box-shadow:0 0 24px #39ffa49c,inset 0 0 19px #baffcaaa;filter:brightness(1.14)}65%{box-shadow:0 0 9px #29d58455,inset 0 0 12px #baffca66;filter:brightness(1)}}
@media(max-width:1370px){.ep-nav{display:none}.ep-mobilemenu{display:block}.ep-topinside{gap:12px}}
@media(max-width:700px){.ep-topinside{min-height:68px;padding:0 14px}.ep-brandstrong{font-size:17px}.ep-brandtiny{font-size:8px;letter-spacing:.7px}.ep-emerald{width:34px;height:34px}.ep-action{font-size:11px;padding:8px}.ep-actions .btn{display:none}.ep-mobilemenu{font-size:12px}}
@media(prefers-reduced-motion:reduce){.ep-emerald,.ep-brandstrong::after{animation:none!important}}
/* All banners keep the slogan along their lower edge. */
.ep-slogan{position:absolute;left:50%;bottom:8px;transform:translateX(-50%);z-index:6;background:#081a13c9;border:1px solid #d7b36c75;border-radius:40px;padding:4px 16px;text-align:center;color:#f5dfb1;font:700 clamp(8px,.85vw,11px) 'DM Sans',sans-serif;letter-spacing:1.3px;white-space:nowrap;text-shadow:0 1px 4px #000}
@media(max-width:600px){.ep-slogan{font-size:8px;letter-spacing:.2px;padding:3px 8px;max-width:95%;white-space:normal}}

/* Active-page tab — accessible and consistent on desktop and mobile. */
.ep-nav a.ep-nav-active,.ep-nav a[aria-current="page"]{background:linear-gradient(180deg,#2d6242,#19432e)!important;color:#ffe6ad!important;border:1px solid #d7b46994!important;box-shadow:inset 0 -3px #dbb66b,0 0 12px #bba76a25!important;text-shadow:0 0 9px #ecc87a47}
.ep-mobilelinks a.ep-nav-active,.ep-mobilelinks a[aria-current="page"]{background:#28533b!important;color:#ffdfaa!important;border-left:4px solid #e5bd72!important;padding-left:13px!important;box-shadow:inset 0 0 18px #e6bd7212!important}

/* Account access is visible without granting any guest editing permission. */
.ep-member-access{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;padding:8px 11px;text-decoration:none;border-radius:7px;border:1px solid #c7a76d;color:#f5dfa8;background:#102a20;font:700 11px 'DM Sans',sans-serif}
.ep-member-access:hover,.ep-member-access:focus-visible{color:#fff7d8;background:#265338;outline-color:#edcc7d}
.ep-register{background:linear-gradient(130deg,#e6c77d,#b78948);color:#10251c}
.ep-register:hover{color:#10251c;background:#f0d99b}
@media(max-width:800px){.ep-actions .ep-member-access{padding:6px 8px;font-size:10px}}
@media(max-width:600px){.ep-actions .ep-register{display:none}}

/* Unified member account UI */
.ep-auth-buttons,.ep-auth-mobile{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.ep-auth-buttons button{cursor:pointer}
.ep-auth-mobile{border-top:1px solid #8c764d65;margin-top:8px;padding:12px 8px}
.ep-auth-mobile button{cursor:pointer}
.ep-sign-out{background:#342a20;color:#f5d5b5}
.ep-auth-dialog{max-width:min(460px,calc(100vw - 28px));width:100%;max-height:90vh;overflow-y:auto;margin:auto;border:1px solid #b99b66;border-radius:15px;background:linear-gradient(150deg,#193e2b,#0b2019);color:#f9edcf;box-shadow:0 25px 85px #000c;padding:0}
.ep-auth-dialog::backdrop{background:#000b;backdrop-filter:blur(4px)}
.ep-auth-panel{padding:27px;font:14px/1.55 'DM Sans',Arial,sans-serif}
.ep-auth-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ep-auth-title-row h2{font:600 24px Cinzel,Georgia,serif;color:#f5d99f;margin:0}
.ep-auth-close{border:0;background:transparent;color:#fff4d3;font-size:30px;cursor:pointer}
.ep-auth-panel p{color:#cddccc}
.ep-auth-tabs{display:flex;gap:7px;margin:19px 0}
.ep-auth-tabs button{flex:1;min-height:40px;cursor:pointer;border:1px solid #7b946e;background:#143525;color:#e9dac0;border-radius:8px}
.ep-auth-tabs button[aria-pressed=true]{border-color:#e3bb73;background:#2d593c;color:#ffe0a0}
.ep-auth-panel form{display:grid;gap:13px}.ep-auth-panel label{display:grid;gap:5px;color:#efd49f;font-weight:700;font-size:12px}
.ep-auth-panel input{width:100%;min-height:43px;padding:10px 12px;background:#091c15;color:#fff6df;border:1px solid #6d8e70;border-radius:8px}
.ep-auth-primary,.ep-auth-discord{cursor:pointer;width:100%;min-height:44px;padding:11px 15px;border-radius:8px;font-weight:700}
.ep-auth-primary{background:linear-gradient(130deg,#f2d995,#c0924e);border:1px solid #f2d99c;color:#122c1e}
.ep-auth-discord{background:#5865f2;border:1px solid #a8b2ff;color:#fff}
.ep-auth-divider{display:flex;align-items:center;gap:12px;color:#a9b9ab;text-align:center;margin:15px 0}
.ep-auth-divider:before,.ep-auth-divider:after{content:'';height:1px;background:#6e8064;flex:1}
#epAuthStatus{min-height:18px;color:#f9cd99;font-size:12px}
.ep-auth-dialog [hidden]{display:none!important}
@media(max-width:850px){.ep-auth-buttons .ep-member-access{font-size:10px;padding:7px 8px}}
@media(max-width:600px){.ep-auth-buttons .ep-register{display:none}}

/* Single account control in the header; legacy directory login stays hidden for compatibility. */
#accountButton[hidden]{display:none!important}
.ep-auth-buttons>.ep-member-access{min-width:88px}

/* Active navigation: high-visibility selected state, even on narrower desktops. */
.ep-topbar .ep-nav a.ep-nav-active,.ep-topbar .ep-nav a[aria-current="page"]{
  background:#275b3c!important;color:#ffe2a4!important;
  border:1px solid #e9bf71!important;
  box-shadow:inset 0 -3px 0 #ebc476,0 0 0 1px #edc16c33,0 0 18px #edc16c44!important;
  font-weight:800!important;
}
.ep-topbar .ep-mobilelinks a.ep-nav-active,.ep-topbar .ep-mobilelinks a[aria-current="page"]{
  background:#275b3c!important;color:#ffe2a4!important;
  border-left:4px solid #e9bf71!important;
  box-shadow:inset 0 0 18px #e9bf7129!important;
}
.ep-current-page{display:none;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  margin-left:auto;color:#ffe2a4;font:700 12px 'DM Sans',Arial,sans-serif;
  background:#235238;border:1px solid #e9bf71;border-radius:7px;padding:9px 11px;
  box-shadow:0 0 12px #d8b56b39;pointer-events:none}
@media(max-width:1370px){.ep-current-page{display:inline-flex;align-items:center;margin-left:auto}.ep-mobilemenu{margin-left:0}}
@media(max-width:650px){.ep-current-page{font-size:10px;max-width:120px;padding:8px 6px}.ep-topinside{gap:7px}}
@media(max-width:420px){.ep-current-page{max-width:96px}}

/* Account recovery controls */
.ep-recovery-links{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;margin:12px 0}
.ep-recovery-links button,.ep-recovery-back{border:none;background:none;color:#f3cf88;cursor:pointer;text-decoration:underline;font:600 12px 'DM Sans',sans-serif;padding:5px 0}
#epResetRequestForm,#epNewPasswordForm,#epUsernameHelp{margin:12px 0;display:grid;gap:12px;color:#e7e2cf;font-size:13px}
#epUsernameHelp p{line-height:1.7;margin:0}
.ep-auth-dialog [hidden]{display:none!important}

/* Page-specific active state: works even if JS initialization is delayed. */
body[data-ep-page="directory"] .ep-topbar .ep-nav a[href="directory.html"],
body[data-ep-page="communities"] .ep-topbar .ep-nav a[href="communities.html"],
body[data-ep-page="directory"] .ep-topbar .ep-mobilelinks a[href="directory.html"],
body[data-ep-page="communities"] .ep-topbar .ep-mobilelinks a[href="communities.html"]{
 background:#275b3c!important;color:#ffe2a4!important;border:2px solid #edc676!important;
 box-shadow:0 0 15px #e5b76888,inset 0 -3px 0 #ffdf8d!important;font-weight:800!important;
 border-radius:7px!important;
}
.ep-owner-discord{background:#5865f2!important;color:#fff!important;border:1px solid #bbc2ff!important}

/* Role-verified controls must never override the HTML hidden attribute. */
[hidden]{display:none !important;}

/* Show the highest verified role beside My account (desktop and mobile). */
.ep-header-role{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;
 border:1px solid #c9ab6e;border-radius:999px;background:#1b3b2a;color:#f7e2ab;
 font:700 11px 'DM Sans',Arial,sans-serif;padding:7px 12px;line-height:1.25;
 box-shadow:0 0 8px #d7ba7930}
.ep-header-role[data-role="web-dev"]{border-color:#b5a6ff;color:#e4dcff;background:#302a52}
.ep-header-role[data-role="officer"]{border-color:#e3bd6a;color:#ffdf99;background:#46381d}
.ep-header-role[data-role="community-lead"]{border-color:#81c9b0;color:#c7f7e3;background:#21483c}
.ep-header-role[data-role="guild-member"]{border-color:#64b9ff;color:#e1f4ff;background:#17466b;box-shadow:0 0 10px #49a8ff45}
.ep-header-role[data-role="member"]{border-color:#b6ab91;color:#e5d9c4;background:#29332b}
@media(max-width:600px){.ep-header-role{padding:6px 9px;font-size:10px}}
