.ep-arena {
  --ink:#312a2c;--faint:#6d6058;--paper:#fff4d9;--rim:#503c35;
  width:min(1100px,100%);margin:0 auto;padding:clamp(18px,4vw,48px) clamp(12px,3vw,32px) 48px;
  color:#ffefd2;font:600 14px/1.4 "DM Sans",sans-serif;
}
.ep-arena * {box-sizing:border-box}
.ep-arena button,.ep-arena input {font:inherit}
.ep-arena button {cursor:pointer}
.ep-arena :is(button,input,summary):focus-visible {outline:3px solid #65deed;outline-offset:3px}
.ep-arena button:disabled,.ep-arena fieldset:disabled button {cursor:default}
.ep-head {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 2px 17px}
.ep-title {display:flex;align-items:center;gap:14px}
.ep-title h1 {margin:0;font:900 clamp(37px,5vw,57px)/.96 Barlow,sans-serif;letter-spacing:-.045em;color:#fff0c6;text-shadow:0 3px #663e27,-1px -1px 1px #432d27,0 5px 11px #38261f}
.ep-title-mark,.ep-room-sigil {display:grid;place-items:center;color:#ffe4a4;background:linear-gradient(145deg,#a6583c,#693c3a);border:2px solid #392b32;box-shadow:inset 0 0 0 2px #e5ad69,0 3px 0 #392b32;border-radius:13px}
.ep-title-mark {width:48px;height:48px;transform:rotate(-5deg)}
.ep-title-mark svg {width:27px;height:27px}
.ep-leaderboard,.ep-edit,.ep-create,.ep-code-form button,.ep-resume,.ep-leave {min-height:36px;border:2px solid var(--rim);border-radius:8px;font:800 15px/1 Barlow,sans-serif!important}
.ep-leaderboard {display:inline-flex;align-items:center;gap:8px;padding:8px 14px;color:#452f2c;background:#ffdda0;box-shadow:inset 0 2px #fff1c9,0 2px 0 #513b34}
.ep-leaderboard svg {color:#915833}
.ep-layout {display:grid;grid-template-columns:minmax(0,1.72fr) minmax(260px,.85fr);gap:17px;align-items:start}
.ep-layout > * {min-width:0}
.ep-modes fieldset {border:0;padding:0;margin:0;min-width:0}
.ep-modes legend {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.ep-features,.ep-secondary-modes {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ep-feature {
  min-height:clamp(185px,20vw,236px);display:flex;align-items:flex-end;isolation:isolate;position:relative;overflow:hidden;
  text-align:left;border:3px solid var(--rim)!important;border-radius:17px;background:#547f5a!important;color:#fff9dd;
  box-shadow:0 4px 0 #3c2e32,0 6px 15px #30222b42;
}
.ep-feature::after {content:"";position:absolute;inset:0;z-index:-1;border-radius:13px;pointer-events:none;box-shadow:inset 0 0 0 2px #fff4be65;background:linear-gradient(0deg,#1b442b 0%,#1a4132df 17%,#203d2c50 40%,transparent 60%)}
.ep-feature-art {position:absolute;z-index:-2;inset:0;background:center/cover no-repeat url("assets/maps/sky-crown.webp")}
.ep-feature-art img {position:absolute;height:66%;max-width:74%;object-fit:contain;bottom:28%;right:10%;filter:drop-shadow(0 4px 2px #343c3370)}
.ep-ranked .ep-feature-art {background-image:url("assets/maps/dusk-hollow.webp")}
.ep-ranked .ep-feature-art img {height:71%;bottom:26%;right:12%}
.ep-ranked::after {background:linear-gradient(0deg,#332947 0%,#382441e8 21%,#33234255 43%,transparent 70%)}
.ep-feature-copy {display:block;position:relative;padding:46px clamp(10px,1.5vw,20px) 15px}
.ep-feature-copy strong,.ep-mode strong,.ep-open-room strong,.ep-fighter strong {display:block;font-family:Barlow,sans-serif}
.ep-feature-copy strong {font-size:clamp(24px,2.5vw,33px);font-weight:900;line-height:.98;letter-spacing:-.035em;text-shadow:0 2px 1px #25252d}
.ep-feature-copy small {display:block;font-size:clamp(11px,1.1vw,13px);font-weight:600;margin-top:5px;line-height:1.3;text-shadow:0 1px 1px #262427}
.ep-feature-glyph {position:absolute;top:10px;left:10px;display:grid;place-items:center;width:33px;height:33px;border:2px solid #604838;border-radius:50%;background:#ffefb4;color:#456b3b;box-shadow:0 2px 0 #564237}
.ep-ranked .ep-feature-glyph {color:#99602a}
.ep-secondary-modes {margin-top:14px}
.ep-mode,.ep-private,.ep-team {
  border:2px solid var(--rim)!important;border-radius:13px;color:var(--ink);background:#fbecd0;
  box-shadow:0 3px 0 #503a35,inset 0 0 0 2px #fff9e8;
}
.ep-mode {min-height:75px;text-align:left;display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:10px 12px}
.ep-glyph {width:39px;height:39px;border-radius:11px;display:grid;place-items:center;background:#c5dde0;color:#386978;border:1px solid #7e9da0;box-shadow:inset 0 2px #e4eff0}
.ep-glyph svg {width:21px;height:21px}
.ep-local .ep-glyph {color:#84623a;background:#f5d696;border-color:#c6a569;box-shadow:inset 0 2px #ffedc4}
.ep-mode strong,.ep-private h2 {font:800 19px/1.05 Barlow,sans-serif;letter-spacing:-.025em;margin:0}
.ep-mode small,.ep-private header small {display:block;margin-top:3px;font-size:11px;line-height:1.3;color:#63544f}
.ep-arrow {font:800 25px/1 Barlow,sans-serif;color:#8e7158;margin-top:-2px}
.ep-private {padding:14px 15px 15px;margin-top:13px}
.ep-private header {display:flex;align-items:center;gap:11px}
.ep-private .ep-glyph {background:#e0d2e8;border-color:#bca5c5;color:#746086;box-shadow:inset 0 2px #eee3f4}
.ep-private-controls {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:13px}
.ep-create,.ep-resume {color:#fff6d9;background:linear-gradient(#7b9459,#526a46);box-shadow:inset 0 1px #a5b77d,0 2px 0 var(--rim);padding:7px 15px}
.ep-code-form {display:flex;align-items:stretch;gap:5px;min-width:0}
.ep-code-form input {min-width:0;width:126px;background:#fff9e9;border:1px solid #a99178;border-radius:6px;color:var(--ink);padding:7px 9px;font-size:13px;font-weight:600;text-transform:uppercase}
.ep-code-form input::placeholder {color:#827368;text-transform:none}
.ep-code-form button,.ep-edit {background:#e8d8b5;color:#554539;padding:5px 12px;box-shadow:inset 0 1px #fdf3d5,0 1px 0 var(--rim)}
.ep-team {background:#3d3840;color:var(--paper);padding:16px;box-shadow:inset 0 0 0 2px #8e745f,0 3px 0 #342b30}
.ep-team > header {display:flex;align-items:center;justify-content:space-between;gap:9px}
.ep-team > header > div {min-width:0}
.ep-team header small {text-transform:uppercase;font:800 10px/1.2 "DM Sans",sans-serif;letter-spacing:.105em;color:#e6d09b}
.ep-team h2 {font:900 clamp(24px,2.5vw,30px)/1 Barlow,sans-serif;margin:3px 0 0;letter-spacing:-.035em;overflow-wrap:anywhere}
.ep-edit {min-height:32px;white-space:nowrap;font-size:13px!important;border-color:#392f32;padding:4px 9px}
.ep-formation {list-style:none;display:grid;gap:4px;padding:0;margin:15px 0}
.ep-fighter {--affinity:#b9d879;display:flex;gap:11px;align-items:center;padding:4px 0}
.ep-fighter[data-affinity="Ember"] {--affinity:#efa16b}.ep-fighter[data-affinity="Tide"] {--affinity:#82c7d8}.ep-fighter[data-affinity="Shade"] {--affinity:#c8a5e9}.ep-fighter[data-affinity="Stone"] {--affinity:#dcb88a}.ep-fighter[data-affinity="Gale"] {--affinity:#89cfaa}
.ep-creature {position:relative;display:grid;place-items:center;flex:none;width:65px;height:60px;background:radial-gradient(ellipse at 48% 85%,var(--affinity) -80%,transparent 72%)}
.ep-creature img {display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 0 #211e2866)}
.ep-fighter-text {min-width:0;display:grid;gap:1px}
.ep-fighter-text > small {font-size:10px;color:var(--affinity);font-weight:700}
.ep-fighter strong {font-size:18px;line-height:1.02;overflow-wrap:anywhere;letter-spacing:-.02em}
.ep-health {display:flex;align-items:center;gap:4px;font-size:10px;font-weight:600;color:#e4d6bd}
.ep-health svg {width:10px;height:10px;color:#f0a28e}
.ep-loadout {border-top:1px solid #72626b;border-bottom:1px solid #72626b}
.ep-loadout summary {display:flex;align-items:center;justify-content:space-between;gap:6px;padding:10px 2px;cursor:pointer;font:800 15px/1.2 Barlow,sans-serif}
.ep-loadout summary::-webkit-details-marker {display:none}
.ep-loadout summary span > svg {width:18px;height:18px;margin-right:4px;color:#eace89}
.ep-loadout summary small {display:block;margin:3px 0 0 25px;color:#d5cabb;font:600 10px/1.2 "DM Sans",sans-serif}
.ep-loadout summary b {font-size:23px;color:#eace89;line-height:1}
.ep-loadout[open] summary b {transform:rotate(180deg)}
.ep-loadout-body {display:grid;gap:13px;padding:4px 0 15px}
.ep-loadout-body h4 {margin:0;color:#f1d499;font:800 16px/1.2 Barlow,sans-serif}
.ep-loadout-body h4 svg {margin-right:5px}
.ep-loadout-body p,.ep-loadout-body li small {font-size:10px;color:#d9cbb8;margin-top:3px}
.ep-loadout-body ul {list-style:none;margin:6px 0 0;padding:0}
.ep-loadout-body li {display:grid;grid-template-columns:36px 1fr;row-gap:0;column-gap:5px;align-items:baseline;padding:3px 0;border-top:1px solid #5a4f59}
.ep-loadout-body li span {font-size:10px;color:#d7c090}.ep-loadout-body li strong {font-size:12px}.ep-loadout-body li small {grid-column:2;margin:0}
.ep-online-rules {display:flex;align-items:flex-start;gap:7px;padding-top:11px;margin:0;font-size:11px;line-height:1.45;color:#dcd0c0}
.ep-online-rules svg {margin-top:1px;color:#e7c77e}
.ep-open-room {margin:0 0 17px;padding:11px 12px;display:flex;align-items:center;gap:9px;color:#fff2ca;background:#3d4b43;border:2px solid #343830;border-radius:12px;box-shadow:inset 0 0 0 1px #85916c}
.ep-open-room > span:nth-child(2) {flex:1}
.ep-open-room strong {font-size:17px;line-height:1.05}
.ep-open-room small {font-size:10px;display:block;color:#ece2c5;margin-top:3px}
.ep-room-sigil {width:34px;height:34px;background:#586950;border-color:#41453d;border-radius:50%}
.ep-leave {background:#5f4c4f;color:#f9e7d1;border-color:#423637;padding:6px 9px}
.ep-modes fieldset:disabled {filter:saturate(.66);opacity:.72}
@media (hover:hover) {
  .ep-feature:hover:not(:disabled) {transform:translateY(-2px);filter:brightness(1.06)}
  .ep-mode:hover:not(:disabled),.ep-arena :is(.ep-leaderboard,.ep-create,.ep-edit,.ep-resume,.ep-leave,.ep-code-form button):hover:not(:disabled) {filter:brightness(1.08)}
}
@media (max-width:760px) {
  .ep-arena {padding:17px 12px 36px}
  .ep-layout {grid-template-columns:1fr;gap:13px}
  .ep-team {grid-row:1;padding:12px}
  .ep-team header small {font-size:9px}
  .ep-team h2 {font-size:22px}
  .ep-formation {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:9px 0 7px;gap:5px}
  .ep-fighter {gap:5px;min-width:0}
  .ep-creature {width:clamp(32px,8vw,54px);height:47px}
  .ep-fighter strong {font-size:clamp(12px,2.5vw,16px)}
  .ep-fighter-text > small,.ep-health {font-size:9px}
  .ep-loadout summary {padding:7px 2px}
  .ep-loadout summary small {display:inline-block;margin:0 0 0 7px}
  .ep-loadout-body {grid-template-columns:repeat(auto-fit,minmax(165px,1fr))}
  .ep-online-rules {font-size:10px;padding-top:7px}
  .ep-features,.ep-secondary-modes {gap:8px}
  .ep-feature {min-height:clamp(146px,35vw,196px);border-radius:13px}
  .ep-feature-copy {padding:30px 10px 11px}
  .ep-feature-glyph {width:27px;height:27px;top:6px;left:6px}
  .ep-private,.ep-secondary-modes {margin-top:11px}
  .ep-mode {gap:6px;padding:9px;min-height:65px}
  .ep-mode .ep-glyph {width:28px;height:31px;border-radius:7px}
  .ep-mode .ep-glyph svg {width:17px;height:17px}
  .ep-mode strong {font-size:16px}
  .ep-mode small {font-size:10px}
  .ep-mode .ep-arrow {display:none}
}
@media (max-width:420px) {
  .ep-title-mark {width:38px;height:38px;border-radius:10px}.ep-title-mark svg {width:23px;height:23px}
  .ep-title {gap:8px}.ep-leaderboard {padding:7px 9px;font-size:13px!important}
  .ep-head {margin-bottom:12px}
  .ep-team .ep-formation {gap:3px}
  .ep-fighter {flex-direction:column;text-align:center;gap:0}
  .ep-fighter-text {justify-items:center}
  .ep-creature {height:43px;width:52px}
  .ep-code-form input {width:105px}
  .ep-private-controls {gap:6px}
  .ep-feature-copy strong {font-size:23px}
  .ep-open-room {gap:5px}
  .ep-open-room .ep-resume,.ep-open-room .ep-leave {padding:5px 7px}
}
@media (prefers-reduced-motion:no-preference) {
  .ep-arena button {transition:filter .15s ease,transform .15s ease}
}
