*,*::before,*::after{box-sizing:border-box}
:root{
  color-scheme:dark;
  --surface:33,33,33;
  --surface-variant:51,51,51;
  --on-surface-variant:238,238,238;
  --primary:33,150,243;
  --border:rgba(255,255,255,.12);
  --gold:#ffd428;
  --card-gold:#ffeb3b;
  --cost:#d8d347;
  --backdrop:url(background.webp);
}
html{
  font-family:Roboto,sans-serif;
  font-size:1rem;
  line-height:1.5;
  overflow-x:hidden;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  -webkit-tap-highlight-color:rgba(0,0,0,0);
  height:100%;
}
body{
  height:100%;
  margin:0;
  overflow:hidden;
  color:#fff;
  background-color:#212121;
  background-image:var(--backdrop);
  background-position:50%;
  background-size:cover;
  background-repeat:no-repeat;
}
a{color:inherit}
button{font:inherit;color:inherit}
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
.app{height:100%}

/* ================= top app bar ================= */
.appbar{
  position:fixed;
  top:0;left:0;right:0;
  z-index:1004;
  height:48px;
  display:flex;
  align-items:center;
  padding:0;
  background:rgba(var(--surface),.9);
  color:#fff;
}
.appbar-brand{
  display:flex;align-items:baseline;gap:7px;
  min-width:0;max-width:260px;
  padding:0 16px 0 14px;
  color:#fff;text-decoration:none;white-space:nowrap;
}
.appbar-brand-name{
  font-size:1rem;font-weight:600;letter-spacing:.01em;
  overflow:hidden;text-overflow:ellipsis;
}
.appbar-brand-version{
  flex:none;font-size:.72rem;color:rgba(255,255,255,.62);
}
.appbar-brand:hover .appbar-brand-name{color:#ffd428}
@media (max-width:600px){
  .appbar-brand{max-width:52vw;padding-left:4px}
  .appbar-brand-version{display:none}
}
.icon-btn{
  width:48px;height:48px;
  flex:0 0 auto;
  display:inline-flex;align-items:center;justify-content:center;
  border:0;border-radius:50%;
  background:transparent;
  cursor:pointer;
}
.icon-btn:hover{background:rgba(255,255,255,.06)}
.icon-btn svg{width:24px;height:24px;fill:currentColor}
.menu-toggle{display:none}
.nav-desktop{display:flex;align-items:center;flex:1 1 auto;min-width:0}
.spacer{flex:1 1 auto}
.nav-btn{
  display:inline-flex;align-items:center;justify-content:center;
  height:28px;
  min-width:64px;
  margin:0 4px;
  padding:0 16px;
  border-radius:4px;
  font-size:.875rem;
  font-weight:500;
  letter-spacing:.0892857143em;
  text-transform:uppercase;
  white-space:nowrap;
  text-decoration:none;
}
.nav-btn:hover{background:rgba(255,255,255,.04)}
.nav-btn:active{background:rgba(255,255,255,.12)}
.nav-btn.active{background:rgba(255,255,255,.12)}

.version{position:relative;display:flex;align-items:center}
.version-btn{
  display:flex;align-items:center;gap:4px;
  height:40px;
  padding:0 4px 0 16px;
  border:0;border-radius:4px;
  background:transparent;
  cursor:pointer;
  text-align:left;
}
.version-btn:hover{background:rgba(255,255,255,.04)}
.version-text{display:flex;flex-direction:column;justify-content:center;gap:1px;line-height:1.1}
.version-label{font-size:.75rem;line-height:1.1;color:rgba(255,255,255,.7)}
.version-value{font-size:1rem;line-height:1.2;white-space:nowrap}
.chevron{width:24px;height:24px;flex:none;fill:rgba(255,255,255,.7);transition:transform .2s}
.version-btn[aria-expanded="true"] .chevron{transform:rotate(180deg)}

/* ================= main scroll area ================= */
.main{
  height:100vh;
  max-height:100vh;
  padding-top:48px;
  display:flex;
  flex-direction:column;
  min-height:0;
}
.scroll{
  flex:1 1 auto;
  overflow-y:auto;
  scroll-behavior:smooth;
  scroll-padding-top:48px;
  position:relative;
}
.container{width:100%;padding:16px}

/* ================= overview ================= */
.page-title{
  margin:0 0 24px;
  font-size:3.75rem;
  font-weight:300;
  line-height:1;
  letter-spacing:-.0083333333em;
  color:#fff;
  text-align:center;
}
.groups{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-around;
  align-content:center;
}
.group{margin:8px;flex:0 0 auto}
.card{
  position:relative;
  background:rgba(var(--surface),.9);
  border-radius:4px;
  box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);
  overflow:hidden;
}
.group-card{height:100%}
.group-title{
  padding:.5rem 1rem;
  color:var(--gold);
  font-size:1.6rem;
  font-weight:700;
  line-height:1.6;
  text-align:center;
  white-space:nowrap;
}
.group-body{padding:16px}
.race-grid{
  display:grid;
  grid-template-columns:repeat(4,52px);
  grid-template-rows:repeat(auto-fill,52px);
  gap:8px;
}
.race-cell{aspect-ratio:1}
.race-wrap{display:block;position:relative;width:52px;height:52px}
.race-icon{
  display:block;
  width:52px;height:52px;
  object-fit:contain;
}
.race-link{position:absolute;inset:0;color:transparent;text-decoration:none;cursor:pointer;border-radius:2px}
.race-link:focus-visible{outline:2px solid rgba(255,255,255,.6);outline-offset:1px}

/* ================= detail page ================= */
.race-slider{
  display:flex;
  align-items:center;
  height:59px;
  margin-bottom:8px;
}
.slider-arrow{
  flex:0 0 52px;
  width:52px;
  height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:0;
  background:transparent;
  color:#fff;
  cursor:pointer;
  border-radius:50%;
  opacity:1;
  transition:opacity .2s;
}
.slider-arrow:hover{background:rgba(255,255,255,.05)}
.slider-arrow[disabled]{opacity:.32;cursor:default;background:transparent}
.slider-arrow svg{width:24px;height:24px;fill:currentColor}
.slider-viewport{
  flex:1 1 auto;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  height:59px;
  scroll-behavior:smooth;
}
.slider-viewport::-webkit-scrollbar{display:none}
.slider-track{display:flex;align-items:flex-start;height:59px;min-width:max-content}
.slider-race{
  position:relative;
  flex:0 0 auto;
  width:48px;
  height:59px;
  margin:0 8px;
  opacity:.5;
  transition:opacity .3s linear;
  user-select:none;
}
.slider-race:hover,.slider-race.active{opacity:1}
.slider-race .race-icon{width:52px;height:52px}
.slider-race a{position:absolute;inset:0;color:transparent;text-decoration:none;outline-offset:1px}

.race-container{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
}
.details-cell{grid-row:span 2;grid-column:1}
.details-card{height:auto}
.race-name{
  margin:0;
  padding:8px 16px 4px;
  font-size:3rem;
  font-weight:400;
  line-height:1.05;
  letter-spacing:0;
  overflow-wrap:break-word;
}
.race-desc{
  padding:16px;
  font-size:.875rem;
  line-height:1.425;
  letter-spacing:.0178571429em;
  overflow-wrap:break-word;
}

.war-card{display:flex;flex-direction:column;min-height:0}
.war-head{
  position:relative;
  flex:0 0 62px;
  height:62px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px 16px;
}
.war-title{
  font-size:16px;
  font-weight:700;
  line-height:normal;
  letter-spacing:1.4285714286px;
  text-transform:uppercase;
  color:var(--card-gold);
  text-align:center;
  white-space:nowrap;
}
.war-title-btn{
  appearance:none;
  border:0;
  background:none;
  padding:0;
  font-family:inherit;
  cursor:pointer;
}
.war-title-btn:hover,.war-title-btn:focus-visible{color:#ffe680;text-shadow:0 0 10px rgba(255,212,40,.45);outline:none}
.war-prepend{
  position:absolute;
  left:5px;top:0;
  height:56px;
  display:flex;
  align-items:center;
  z-index:2;
}
.war-append{
  position:absolute;
  right:5px;top:0;
  height:56px;
  display:flex;
  align-items:center;
  gap:2px;
  z-index:2;
}
.war-body{
  flex:1 1 auto;
  padding:16px 16px 12px;
  display:flex;
  flex-direction:column;
}

.mini-icon{
  display:block;
  object-fit:contain;
}
.atk-icon{width:24px;height:24px}
.coin{width:16px;height:16px}
.cost{font-size:11.2px;line-height:1.5;color:var(--cost);white-space:nowrap}

.section-label{
  display:flex;
  align-items:center;
  gap:8px;
  margin:4px 0;
  color:#9e9e9e;
  font-size:12px;
  line-height:20px;
  letter-spacing:.4px;
  font-weight:400;
}
.section-label::before,.section-label::after{
  content:"";
  flex:1 1 auto;
  height:1px;
  background:var(--border);
}
.section-label:first-child{margin-top:-24px;margin-bottom:8px}

.icon-grid{
  display:grid;
  grid-template-columns:repeat(4,52px);
  grid-auto-rows:52px;
  gap:8px;
  justify-content:center;
  margin:0 auto;
}
.icon-cell{width:52px;height:52px}
.bonus-spells-grid .icon-cell{
  box-sizing:border-box;
  border:1px solid #3a3a3a;
  background:
    linear-gradient(135deg, rgba(255,255,255,.035) 0%, rgba(255,255,255,0) 45%),
    #0c0c0c;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.5);
}
.icon-slot{
  position:relative;
  width:52px;
  height:52px;
  padding:0;
  border:0;
  background:transparent;
  cursor:default;
  border-radius:2px;
  display:block;
}
.icon-slot.clickable{cursor:pointer}
.icon-slot:focus-visible{outline:2px solid rgba(255,255,255,.6);outline-offset:1px}
.icon-slot:not(.clickable):hover .game-icon{filter:brightness(1.18)}
.game-icon{
  display:block;
  width:52px;
  height:52px;
  object-fit:cover;
  transition:filter .15s ease;
}
.icon-slot .dot{
  display:none;
  position:absolute;
  left:-4px;top:-4px;
  width:9px;height:9px;
  border-radius:50%;
  background:rgb(var(--primary));
  border:1.5px solid #212121;
  box-sizing:content-box;
  z-index:1;
}
.icon-slot.has-details .dot{display:block}

.bonus-buildings{
  display:flex;
  flex-wrap:wrap;
  gap:0 8px;
  margin-top:4px;
}
.bonus-building{
  display:inline-flex;
  align-items:center;
  height:26px;
  padding:0 8px;
  border:0;
  background:transparent;
  color:#fff;
  font-size:11px;
  font-weight:500;
  letter-spacing:.0892857143em;
  text-transform:uppercase;
  white-space:nowrap;
  cursor:default;
  border-radius:4px;
}
.bonus-building:hover{background:rgba(255,255,255,.06)}
.bonus-building{cursor:pointer;transition:background .16s ease,color .16s ease,transform .12s ease}
.bonus-building.active{color:var(--card-gold);background:rgba(255,212,40,.1)}
.bonus-building.clicked{animation:bonus-building-click .3s ease}
@keyframes bonus-building-click{
  0%{transform:scale(1)}
  35%{transform:scale(.92);background:rgba(255,255,255,.18)}
  100%{transform:scale(1)}
}
.bonus-talent-grid .icon-slot{transition:opacity .18s ease,filter .18s ease}
.bonus-talent-grid .icon-slot.filtered-out{opacity:.12;filter:grayscale(1);pointer-events:none}

/* ================= tooltip ================= */
.item-tooltip{
  position:fixed;
  left:0;top:0;
  z-index:2000;
  width:max-content;
  max-width:350px;
  padding:5px 16px;
  border-radius:4px;
  background:rgb(var(--surface-variant));
  color:rgb(var(--on-surface-variant));
  font-size:.875rem;
  line-height:1.6;
  overflow-wrap:break-word;
  pointer-events:none;
  opacity:0;
  visibility:hidden;
  transition:opacity .15s cubic-bezier(0,0,.2,1),visibility .15s;
}
.item-tooltip.visible{opacity:.96;visibility:visible}
.tt-title{
  font-size:1rem;
  font-weight:700;
  line-height:1.4;
  margin-bottom:2px;
}
.tt-desc{margin:0}
.tt-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:2px 6px;
  margin:3px 0;
  font-size:.8125rem;
  line-height:1.6;
}
.tt-ico{
  display:inline-block;
  width:16px;
  height:16px;
  flex:0 0 16px;
  object-fit:contain;
  margin-right:2px;
  vertical-align:middle;
}
.tt-level{white-space:nowrap}
.tt-lv{color:#9e9e9e}
.tt-val{color:#eee}
.tt-val.cost{color:var(--cost);font-size:1.1em}
.tt-level+.tt-level{margin-left:6px}
.tt-targets{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px;
  margin-top:6px;
  font-size:.75rem;
  line-height:1.6;
}
.tt-targets-label{color:#fff;font-weight:700;margin-right:2px}
.tt-chip{display:inline-block;padding:0 6px;border-radius:3px;background:#3a3a3a;color:#e8e8e8}
.tt-air{background:#7a3a45}
.tt-friend{background:#2f6b3a}
.tt-ground{background:#5c5628}
.tt-invulnerable{background:#7a4a1f}
.tt-nonhero{background:#6b4a2a}
.tt-organic{background:#3d6b3d}
.tt-self{background:#2f6b6b}
.tt-vulnerable{background:#7a3b5a}
.tt-enemies,.tt-enemy{background:#6b2f2f}
.tt-neutral{background:#555555}
.tt-structure{background:#6b5a2f}
.tt-ward{background:#4a5a6b}
.tt-mechanical{background:#4a4a6b}
.tt-ancient{background:#6b4a6b}
.tt-dead{background:#444444}
.tt-row+.tt-desc,.tt-targets+.tt-desc,.tt-stats+.tt-desc{margin-top:6px}
.tt-stats{
  display:grid;
  grid-template-columns:auto auto;
  gap:2px 12px;
  margin-top:6px;
  padding-top:6px;
  border-top:1px solid rgba(255,255,255,.14);
  font-size:.8125rem;
  line-height:1.5;
}
.tt-stats dt{color:#9e9e9e;margin:0}
.tt-stats dd{margin:0;color:#eee}
.tt-stats dd.cost{color:var(--cost)}
.war-header>.w3-colored:first-of-type{font-size:1.6rem}
.war-tooltip hr{margin:4px 0;opacity:.6}

/* ================= item drawer ================= */
.item-scrim{
  position:fixed;
  top:48px;left:0;right:0;bottom:0;
  z-index:1190;
  background:rgba(0,0,0,.5);
  opacity:0;
  visibility:hidden;
  transition:opacity .2s,visibility .2s;
}
.item-scrim.show{opacity:1;visibility:visible}
.item-drawer{
  position:fixed;
  top:48px;left:0;bottom:0;
  z-index:1200;
  width:400px;
  max-width:92vw;
  background:#1e1e1e;
  box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12);
  transform:translateX(-100%);
  visibility:hidden;
  transition:transform .2s cubic-bezier(0,0,.2,1),visibility .2s;
  overflow-y:auto;
  padding:16px;
}
.item-drawer.open{transform:none;visibility:visible}
.drawer-head{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.drawer-head .game-icon{width:48px;height:48px;flex:none}
.drawer-name{
  flex:1 1 auto;
  min-width:0;
  font-size:1.25rem;
  font-weight:500;
  line-height:1.35;
}
.drawer-close{
  flex:none;
  width:36px;height:36px;
  display:flex;align-items:center;justify-content:center;
  border:0;border-radius:50%;
  background:transparent;
  cursor:pointer;
  color:#fff;
}
.drawer-close:hover{background:rgba(255,255,255,.08)}
.drawer-close svg{width:20px;height:20px;fill:currentColor}
.drawer-desc{font-size:.875rem;line-height:1.5;letter-spacing:.0178571429em;color:#eee;overflow-wrap:break-word}
.dd-section{margin-top:18px}
.dd-section h4{
  margin:0 0 8px;
  font-size:.75rem;
  font-weight:500;
  text-transform:uppercase;
  letter-spacing:.4px;
  color:#9e9e9e;
  display:flex;
  align-items:center;
  gap:8px;
}
.bonus-cost{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  gap:4px;
  color:var(--cost);
  text-transform:none;
  letter-spacing:0;
  font-size:.8rem;
}
.bonus-cost img{width:18px;height:18px;object-fit:contain}
.stat-grid{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin:0;font-size:.875rem;line-height:1.4}
.hero-attr-grid{display:flex;gap:28px;align-items:flex-start;margin-top:4px}
.hero-attr{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:58px}
.hero-attr img{width:32px;height:32px;object-fit:contain}
.hero-attr span{font-size:.95rem;color:#e6e6e6}
.hero-attr span.primary{color:#ffd428}
.hero-stat-table{width:100%;border-collapse:collapse;font-size:.85rem;line-height:1.45}
.hero-stat-table th,.hero-stat-table td{padding:2px 4px;text-align:left;border-bottom:1px solid rgba(255,255,255,.06)}
.hero-stat-table th{color:#9e9e9e;font-weight:500;font-size:.75rem}
.hero-stat-table th:nth-child(2),.hero-stat-table th:nth-child(3),.hero-stat-table td:nth-child(2),.hero-stat-table td:nth-child(3){text-align:right}
.hero-stat-table td:nth-child(2){color:#9e9e9e}
.hero-stat-table td.current{color:#eee;font-weight:600}
.building-tag-list{display:flex;flex-wrap:wrap;gap:5px}
.building-tag{padding:2px 8px;border:1px solid #58616e;border-radius:3px;background:#2b313a;color:#dfe4ea;font-size:.78rem}
.building-level-tabs{display:flex;gap:4px;margin:0 0 12px;border-bottom:1px solid #333b45;padding-bottom:8px}
.building-level-tab{appearance:none;border:1px solid #3a444f;border-radius:3px;background:#222831;color:#b7c0ca;padding:3px 10px;font:inherit;font-size:.78rem;cursor:pointer}
.building-level-tab:hover{border-color:#6b7785;color:#fff}
.building-level-tab.active{border-color:#c9a227;background:#3a3218;color:#ffd428;font-weight:600}
.hero-attr-tooltip{
  position:fixed;
  z-index:3000;
  display:none;
  min-width:230px;
  max-width:340px;
  padding:10px 12px 9px;
  border:2px solid #4d6b3f;
  border-radius:2px;
  background:linear-gradient(180deg, rgba(12,20,12,.97), rgba(5,9,6,.97));
  box-shadow:0 8px 24px rgba(0,0,0,.65), inset 0 0 0 1px rgba(255,255,255,.06);
  color:#e8e8e8;
  font-size:12px;
  line-height:1.55;
  pointer-events:none;
}
.hero-attr-tooltip.show{display:block}
.hero-attr-tooltip .ha-title{color:#fff;font-weight:700;margin-bottom:3px}
.hero-attr-tooltip .ha-head{color:#ffd428;font-weight:700;margin-top:4px}
.hero-attr-tooltip .ha-line{color:#e6e6e6}
.hero-attr-tooltip .ha-main{color:#ffd428;font-weight:700}
.stat-grid dt{color:#9e9e9e;margin:0}
.stat-grid dd{margin:0;color:#eee}
.dd-cost{font-size:.875rem;color:var(--cost);line-height:1.6}

/* ================= version menu ================= */
.menu{
  position:fixed;
  z-index:1300;
  min-width:200px;
  padding:8px 0;
  border-radius:4px;
  background:#212121;
  box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);
}
.menu[hidden]{display:none}
.menu-group{padding:8px 16px 4px;font-size:.75rem;color:rgba(255,255,255,.6)}
.menu-item{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  width:100%;height:40px;
  padding:0 16px;
  border:0;
  background:transparent;
  color:rgba(255,255,255,.87);
  font-size:.875rem;
  text-align:left;
  cursor:pointer;
}
.menu-item:hover{background:rgba(255,255,255,.08)}
.menu-check{width:18px;height:18px;flex:none;fill:currentColor;visibility:hidden}
.menu-item.selected .menu-check{visibility:visible}
.menu-item[disabled]{opacity:.38;cursor:default;background:transparent}

/* ================= mobile drawer ================= */
.scrim{
  position:fixed;
  top:48px;right:0;bottom:0;left:0;
  z-index:1002;
  background:rgba(0,0,0,.5);
  opacity:0;
  visibility:hidden;
  transition:opacity .2s,visibility .2s;
}
.scrim.show{opacity:1;visibility:visible}
.nav-drawer{
  position:fixed;
  top:48px;left:0;bottom:0;
  z-index:1003;
  width:256px;
  max-width:80vw;
  padding:8px 0;
  overflow-y:auto;
  background:#212121;
  transform:translateX(-100%);
  visibility:hidden;
  transition:transform .2s cubic-bezier(0,0,.2,1),visibility .2s;
  box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12);
}
.nav-drawer.open{transform:none;visibility:visible}
.drawer-head-title{padding:8px 16px 16px;font-size:1rem;font-weight:500}
.drawer-item{
  display:flex;align-items:center;
  height:48px;
  padding:0 16px;
  font-size:.875rem;
  letter-spacing:.0071428571em;
  text-decoration:none;
}
.drawer-item:hover{background:rgba(255,255,255,.08)}
.drawer-item.active{background:rgba(255,255,255,.12)}
.drawer-divider{height:1px;margin:8px 0;background:rgba(255,255,255,.12)}
.drawer-label{padding:8px 16px 4px;font-size:.75rem;color:rgba(255,255,255,.6)}

/* ================= snackbar ================= */
.toast{
  position:fixed;
  left:50%;bottom:24px;
  z-index:3000;
  max-width:calc(100vw - 32px);
  padding:12px 16px;
  border-radius:4px;
  background:#424242;
  color:#fff;
  font-size:.875rem;
  box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12);
  opacity:0;
  visibility:hidden;
  transform:translate(-50%,16px);
  transition:opacity .2s,transform .2s,visibility .2s;
  pointer-events:none;
}
.toast.show{opacity:1;visibility:visible;transform:translate(-50%,0)}
.bonus-empty-tip{
  position:fixed;
  z-index:3000;
  padding:8px 18px;
  border:1px solid #5a5a5a;
  border-radius:4px;
  background:#2f2f2f;
  color:#fff;
  font-size:.85rem;
  line-height:1.3;
  opacity:0;
  visibility:hidden;
  transform:translateY(4px);
  transition:opacity .14s ease,transform .14s ease,visibility .14s;
  pointer-events:none;
  box-shadow:0 4px 14px rgba(0,0,0,.45);
}
.bonus-empty-tip.show{opacity:1;visibility:visible;transform:translateY(0)}
.bonus-empty-tip::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-6px;
  margin-left:-6px;
  border:6px solid transparent;
  border-top-color:#5a5a5a;
  border-bottom:0;
}
.bonus-empty-tip.below{transform:translateY(-4px)}
.bonus-empty-tip.below.show{transform:translateY(0)}
.bonus-empty-tip.below::after{bottom:auto;top:-6px;border-top:0;border-bottom:6px solid #5a5a5a}

@media (max-width:959.98px){
  .nav-desktop{display:none}
  .menu-toggle{display:inline-flex}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition-duration:.01ms!important;animation-duration:.01ms!important;scroll-behavior:auto!important}
}




/* ================= artifacts / ultimates / misc ================= */
.page-icon{
  display:block;
  width:52px;
  height:52px;
  object-fit:contain;
  transition:filter .15s ease;
}
.icon-slot:hover .page-icon{filter:brightness(1.15)}
.page-icon-sm{width:20px;height:20px}

.artifact-card{padding:16px;min-height:560px}
.artifact-controls{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  flex-wrap:wrap;
  gap:24px;
  font-size:.875rem;
  color:#ddd;
  margin-bottom:8px;
}
.artifact-controls label{display:inline-flex;align-items:center;gap:8px;cursor:pointer}
.artifact-controls input{width:16px;height:16px;accent-color:#2196f3}
.artifact-level{margin:24px 0 0}
.artifact-level:first-child{margin-top:8px}
.artifact-level-title{font-size:1.5rem;font-weight:400;line-height:1.2;margin:0 0 8px}
.artifact-grid{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start}
.artifact-item{display:flex;flex-direction:column;gap:4px;max-width:300px}
.artifact-path{display:none;flex-direction:column;gap:2px;font-size:11px;color:#bbb;line-height:1.5}
.show-paths .artifact-path,.artifact-item.open .artifact-path{display:flex}
.path-label{color:#9e9e9e;font-size:10px;text-transform:uppercase;letter-spacing:.4px}
.path-row{display:flex;flex-wrap:wrap;gap:3px}
.path-item{
  display:inline-flex;align-items:center;gap:3px;
  background:rgba(255,255,255,.06);
  border-radius:2px;padding:1px 4px;white-space:nowrap;
}

.ultimate-wrap{position:relative;min-height:264px;padding-left:7%;margin-top:8px}
.ultimate-card{position:absolute;left:70%;top:0;width:264px;padding:16px}
.ultimate-grid{display:grid;grid-template-columns:repeat(4,52px);gap:8px;justify-content:center}
.ultimate-grid .icon-slot.selected{outline:2px solid var(--gold);outline-offset:1px}
.ultimate-detail{display:flex;flex-wrap:wrap;gap:16px;justify-content:flex-start}
.spell-card{
  width:clamp(360px,18vw,466px);
  min-width:360px;
  max-width:466px;
  flex:0 0 clamp(360px,18vw,466px);
  min-height:235px;
  padding:16px;
  display:flex;
  flex-direction:column;
}
.spell-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.spell-card-title{color:var(--gold);font-size:1.75rem;font-weight:700;line-height:1.2;margin:0}
.spell-card-icon{flex:0 0 40px;width:40px;height:40px}
.spell-card-req{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  color:#fff;font-weight:700;font-size:.875rem;margin-bottom:12px;
}
.spell-cost{display:inline-flex;align-items:center;gap:4px;color:#fff}
.mana-icon{
  display:inline-block;width:18px;height:18px;
  object-fit:contain;
}
.spell-card-desc{font-size:.875rem;line-height:1.5;color:#eee}
.spell-card-desc hr{border:0;border-top:1px solid rgba(255,255,255,.15);margin:6px 0}

.misc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:stretch}
.misc-card{padding:16px;overflow:hidden;height:100%}
.misc-title{
  color:var(--gold);
  font-size:1.6rem;
  font-weight:700;
  line-height:1.6;
  text-align:center;
  margin:0 0 12px;
}
.misc-scroll{overflow-x:auto;padding-bottom:4px}
.misc-table{
  border-collapse:collapse;
  width:100%;
  min-width:520px;
  font-size:.875rem;
}
.misc-table th{
  font-weight:500;color:#e6e6e6;
  padding:6px 4px;
  border-bottom:1px solid rgba(255,255,255,.14);
  text-align:center;white-space:nowrap;
}
.misc-table td{
  padding:7px 4px;
  border-bottom:1px solid rgba(255,255,255,.1);
  text-align:center;white-space:nowrap;color:#eee;
}
.misc-table td:first-child,.misc-table th:first-child{text-align:left}
.misc-table .mini-icon{width:22px;height:22px}
.damage-table{min-width:0;table-layout:fixed}
.damage-table th:first-child,.damage-table td:first-child{width:44px;padding-left:0}
.damage-table th:first-child,.damage-table td.dmg-type{width:118px;text-align:left;padding-left:2px}
.damage-table .dmg-type{white-space:nowrap}
.damage-table .dmg-type .mini-icon{width:22px;height:22px;margin-right:5px;vertical-align:middle}
.damage-table .dmg-type span{font-size:.76rem;color:#dfe4ea;vertical-align:middle}
.damage-table th{font-size:.72rem;color:#cfd8e3;white-space:nowrap;text-align:center}
.damage-table th:first-child{text-align:left}
.damage-table th .mini-icon{width:18px;height:18px;margin-right:2px}
.damage-table .armor-head-label{font-size:.64rem;vertical-align:middle}
.damage-table th,.damage-table td{padding:6px 2px}
.damage-table .mini-icon{width:32px;height:32px}
.damage-table .dmg-val{font-size:.875rem}
.dmg-val.good{color:#7ed957}
.dmg-val.mid{color:#d8d347}
.dmg-val.bad{color:#ff6b6b}
.bounty-table,.trigger-table{min-width:0}
.bounty-race{text-align:center;font-weight:700;color:#fff;margin-bottom:8px}
.bounty-table td:first-child{width:45%;text-align:left;color:#ddd}
.bounty-table td:last-child{width:55%;text-align:center;color:#fff}
.trigger-table th:first-child{width:42%}
.neutral-card{grid-column:1/-1}
.neutral-grid{display:flex;flex-wrap:wrap;gap:20px 24px}
.neutral-item{flex:0 0 170px;min-width:0}
.neutral-name{font-size:1.0625rem;font-weight:700;margin-bottom:8px;color:#fff}
.neutral-icons{display:flex;align-items:center;gap:5px}
.neutral-icons .mini-icon{width:32px;height:32px}
.neutral-icons .page-icon{width:32px;height:32px}
.tt-sub{font-weight:700;color:#ffd428;margin-top:6px;font-size:.8125rem}

@media (max-width:1100px){
  .misc-grid{grid-template-columns:1fr}
  .neutral-card{grid-column:auto}
}

.tt-desc-gap{margin-top:8px}


@media (max-width:959.98px){
  .ultimate-wrap{
    position:static;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:16px;
    min-height:0;
    padding-left:0;
  }
  .ultimate-detail{order:2;justify-content:center;width:100%}
  .ultimate-card{position:static;order:1}
}



@media (min-width:960px) and (max-width:1200px){
  .spell-card{
    width:290px;
    min-width:290px;
    max-width:290px;
    flex-basis:290px;
  }
  .spell-card-title{font-size:1.4rem}
}

@media (max-width:959.98px){
  .spell-card{
    width:100%;
    max-width:390px;
    min-width:0;
    flex:1 1 auto;
  }
}

@media (min-width:1800px){
  .neutral-item{flex-basis:220px}
}

.damage-table th .mini-icon{display:inline-block;vertical-align:middle}


.trigger-table th,.trigger-table td{padding:12px 8px}

/* destiny / 天命天赋 */
.destiny-page{max-width:1080px;margin:0 auto;padding:8px 0 32px}
.destiny-head{margin:0 0 22px}
.destiny-kicker{display:block;color:#d8ad4b;font-size:11px;letter-spacing:.18em;text-transform:uppercase;margin-bottom:5px}
.destiny-head h1{margin:0 0 6px;color:#f2f4f7;font-size:1.85rem;font-weight:700}
.destiny-head p{margin:0;color:#9ba6b3;font-size:13px}
.destiny-layout{display:grid;grid-template-columns:160px minmax(0,1fr);gap:14px;align-items:start}
.destiny-tabs{position:sticky;top:16px;display:flex;flex-direction:column;gap:7px;padding:10px;border:1px solid #2b333d;border-radius:9px;background:rgba(15,19,25,.84)}
.destiny-tab{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 13px;border:1px solid #323b48;border-radius:6px;background:#171d25;color:#c5ced8;font:inherit;font-size:13px;text-align:left;cursor:pointer;transition:border-color .15s,background .15s,color .15s}
.destiny-tab span{color:#7f8a98;font-size:11px}
.destiny-tab:hover{border-color:#8e6d2d;color:#f0d697}
.destiny-tab.active{border-color:#d8ad4b;background:#2a2417;color:#ffd56c}
.destiny-tab.active span{color:#d8ad4b}
.destiny-main{min-width:0}
.destiny-panel{border:1px solid #2b333d;border-radius:9px;background:rgba(15,19,25,.84);overflow:hidden}
.destiny-panel[hidden]{display:none}
.destiny-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;border-bottom:1px solid #2b333d}
.destiny-panel-head h2{margin:0;color:#f2d27a;font-size:1.1rem}
.destiny-count{color:#8793a1;font-size:11px}
.destiny-scroll{height:390px;overflow-y:auto;overflow-x:hidden;padding:14px;scrollbar-width:thin;scrollbar-color:#6b5730 #11161d}
.destiny-scroll::-webkit-scrollbar{width:8px}
.destiny-scroll::-webkit-scrollbar-track{background:#11161d;border-radius:4px}
.destiny-scroll::-webkit-scrollbar-thumb{background:#6b5730;border-radius:4px}
.destiny-scroll::-webkit-scrollbar-thumb:hover{background:#9b7b3c}
.destiny-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:9px}
.destiny-slot{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:0;border:0;background:transparent;color:#9ba6b3;font:inherit;cursor:pointer}
.destiny-slot-frame{display:grid;place-items:center;width:54px;height:54px;border:1px solid #39424e;border-radius:5px;background:#0d1116;overflow:hidden;transition:border-color .15s,box-shadow .15s,transform .15s}
.destiny-slot-frame img{width:50px;height:50px;object-fit:contain;display:block}
.destiny-slot:hover .destiny-slot-frame,.destiny-slot.selected .destiny-slot-frame{border-color:#d8ad4b;box-shadow:0 0 0 1px rgba(216,173,75,.35);transform:translateY(-1px)}
.destiny-slot-number{font-size:9px;line-height:1;color:#7f8a98}
.destiny-slot.selected .destiny-slot-number,.destiny-slot:hover .destiny-slot-number{color:#ffd56c}
.destiny-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.destiny-tag{padding:3px 8px;border:1px solid #3a4654;border-radius:999px;color:#a9b8c7;font-size:11px}
.destiny-empty{display:grid;place-items:center;min-height:160px;padding:20px;color:#727f8d;font-size:13px;text-align:center}
.destiny-grid > .destiny-empty{grid-column:1/-1}
.destiny-muted{color:#7f8a98}

/* destiny hover tooltip */
.destiny-tooltip{position:fixed;z-index:1003;width:min(350px,calc(100vw - 24px));max-height:calc(100vh - 72px);overflow:hidden;padding:12px 14px 13px;border:1px solid #4a3d26;border-radius:8px;background:rgba(16,20,26,.98);color:#d7e0e8;box-shadow:0 18px 50px rgba(0,0,0,.62);pointer-events:none}
.destiny-tooltip[hidden]{display:none}
.destiny-tip-head{display:flex;gap:10px;align-items:center;padding-bottom:9px;border-bottom:1px solid #303943}
.destiny-tip-icon{flex:0 0 auto;width:40px;height:40px;border:1px solid #6e5624;border-radius:5px;background:#0b0f14;object-fit:contain}
.destiny-tip-title{min-width:0}
.destiny-tip-kicker{display:block;color:#d8ad4b;font-size:9px;letter-spacing:.08em;margin-bottom:2px}
.destiny-tip-title h3{margin:0;color:#ffd56c;font-size:.98rem;line-height:1.3;word-break:break-word}
.destiny-tooltip .destiny-tags{margin-top:7px;gap:4px}
.destiny-tooltip .destiny-tag{padding:2px 6px;font-size:10px}
.destiny-tip-effect{margin-top:8px;padding-top:8px;border-top:1px solid #303943;color:#d7e0e8;font-size:12.5px;line-height:1.7;word-break:break-word}
.destiny-tip-effect .w3-colored{font-weight:600}
.destiny-tip-effect .destiny-muted{color:#7f8a98}

@media (max-width:1100px){
  .destiny-layout{grid-template-columns:150px minmax(0,1fr)}
}
@media (max-width:720px){
  .destiny-layout{grid-template-columns:1fr}
  .destiny-tabs{position:static;flex-direction:row;flex-wrap:wrap}
  .destiny-tab{flex:1 1 140px;justify-content:center}
  .destiny-scroll{max-height:none;min-height:0;padding:12px}
  .destiny-grid{grid-template-columns:repeat(auto-fill,minmax(60px,1fr));gap:8px}
  .destiny-tooltip{width:calc(100vw - 20px)}
}

