body.mode-account #search,
body.mode-account #queues,
body.mode-account #filters,
body.mode-account #list,
body.mode-account #foot {
  display: none;
}

.tools {
  flex-wrap: wrap;
  justify-content: flex-end;
}

#account-view {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  padding: 0.8rem clamp(0.75rem, 1.5vw, 1.75rem) 2.4rem;
}

#account-view[hidden] {
  display: none !important;
}

#account-view.acct-gate {
  display: block;
}

.acct-nav {
  position: sticky;
  top: 4.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.35rem;
  background: var(--bar);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
}

.acct-nav button {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  border-radius: 0.65rem;
  cursor: pointer;
}

.acct-nav button[aria-current="true"] {
  background: var(--chip);
  color: var(--gold);
}

.acct-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.acct-head,
.acct-card,
.acct-row,
.acct-stat,
.acct-key {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.acct-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
}

.acct-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.acct-head p,
.acct-note,
.acct-muted {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.acct-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.acct-actions .tool {
  white-space: normal;
  line-height: 1.25;
  text-align: center;
  max-width: 14rem;
  padding: 0.35rem 0.7rem;
}

.acct-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}

.acct-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.45rem;
}

.acct-stat {
  padding: 0.6rem 0.7rem;
}

.acct-stat b {
  display: block;
  font-size: 1rem;
  font-weight: 650;
}

.acct-stat span {
  color: var(--muted);
  font-size: 0.74rem;
}

.acct-key {
  max-width: 38rem;
  padding: 1rem;
}

.acct-key h2 {
  margin: 0 0 0.35rem;
}

.acct-key p {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.acct-key .search {
  margin-top: 0;
}

.acct-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.2rem 0 0.8rem;
}

.acct-card {
  padding: 0.7rem 0.75rem;
}

.boss-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.boss-row .acct-title {
  flex: 1;
  min-width: 0;
}

.track-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.track-head .acct-cat {
  margin: 0;
}

.acct-card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
}

.acct-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.acct-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.4rem 0.55rem;
  border-left: 3px solid var(--line);
}

.acct-row > div,
.acct-row > strong {
  min-width: 0;
  flex: 1;
}

.acct-row.r-Ascended { border-left-color: #fb3e8d; }
.acct-row.r-Legendary { border-left-color: #a866e0; }
.acct-row.r-Exotic { border-left-color: #ffa405; }
.acct-row.r-Rare { border-left-color: #f8e04a; }
.acct-row.r-Masterwork { border-left-color: #1a9306; }
.acct-row.r-Fine { border-left-color: #4a8bdf; }

.acct-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: #0d1118;
  border-radius: 0.4rem;
}

.acct-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: baseline;
}

.acct-title strong {
  font-size: 0.92rem;
}

.acct-count {
  color: var(--gold);
  font-size: 0.82rem;
}

.acct-locs {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  margin-top: 0.2rem;
}

.acct-locs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.acct-locs button:hover {
  color: var(--text);
}

.acct-people {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
}

.acct-picker {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.acct-picker button {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font: inherit;
  border-radius: 0.7rem;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
}

.acct-picker button[aria-current="true"] {
  border-color: var(--gold);
}

.acct-picker img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.acct-picker small {
  display: block;
  color: var(--muted);
}

.acct-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem;
}

.acct-kv {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.15rem 0.5rem;
  font-size: 0.86rem;
}

.acct-kv span {
  color: var(--muted);
}

.acct-trait {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.25rem;
  font-size: 0.82rem;
}

button.acct-trait {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

button.acct-trait:hover {
  color: var(--gold);
}

.acct-trait img,
.acct-skill img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.acct-skill {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.82rem;
  margin: 0.15rem 0;
}

.acct-warn {
  color: var(--amber);
  font-size: 0.84rem;
}

.acct-ok {
  color: var(--green);
}

.acct-miss {
  color: var(--dim);
}

.acct-link {
  color: var(--gold);
}

.acct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 0.45rem;
}

.acct-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  min-height: 7.2rem;
  padding: 0.45rem 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--line);
  border-radius: 0.75rem;
  background: var(--card);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: center;
}

.acct-cell.r-Ascended { border-top-color: #fb3e8d; }
.acct-cell.r-Legendary { border-top-color: #a866e0; }
.acct-cell.r-Exotic { border-top-color: #ffa405; }
.acct-cell.r-Rare { border-top-color: #f8e04a; }
.acct-cell.r-Masterwork { border-top-color: #1a9306; }
.acct-cell.r-Fine { border-top-color: #4a8bdf; }

.acct-cell span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
  font-size: 0.74rem;
  line-height: 1.2;
}

.acct-cell small {
  color: var(--gold);
  font-size: 0.72rem;
}

.acct-cat {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.95rem;
}

.acct-swatch {
  width: 46px;
  height: 46px;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  flex: 0 0 auto;
}

.dye-name {
  font-size: 0.72rem;
  line-height: 1.15;
  max-width: 100%;
}

.title-cols {
  column-count: 4;
  column-gap: 1.4rem;
}

.title-cols p {
  break-inside: avoid;
  margin: 0.2rem 0;
}

.bag-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.85rem 0 0.35rem;
}

.bag-head .bag-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.bag-head strong,
.bag-head span {
  display: block;
}

.bag-head span {
  color: var(--dim);
  font-size: 0.84rem;
}

#account-view .chip.exp-core,
#account-view h3.exp-core { background: #6b5420; color: #f3e2a3; }
#account-view .chip.exp-free,
#account-view h3.exp-free { background: #3a4250; color: #d5dbe6; }
#account-view .chip.exp-hot,
#account-view h3.exp-hot { background: #1f6b32; color: #e7ffe9; }
#account-view .chip.exp-pof,
#account-view h3.exp-pof { background: #8c2a24; color: #ffd4cf; }
#account-view .chip.exp-ibs,
#account-view h3.exp-ibs { background: #1d5878; color: #d6f1ff; }
#account-view .chip.exp-eod,
#account-view h3.exp-eod { background: #0f6e62; color: #d4fff6; }
#account-view .chip.exp-soto,
#account-view h3.exp-soto { background: #5a3d86; color: #f0e4ff; }
#account-view .chip.exp-jw,
#account-view h3.exp-jw { background: #8a5a12; color: #ffe7c2; }
#account-view .chip.exp-voe,
#account-view h3.exp-voe { background: #243e86; color: #dce4ff; }

.acct-detail {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.45);
}

.acct-detail-card {
  width: min(420px, 100%);
  height: 100%;
  overflow: auto;
  background: var(--bar);
  border-left: 1px solid var(--line);
  padding: 0.9rem;
}

.acct-detail-card h3 {
  margin: 0.2rem 0 0.35rem;
}

button.detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  min-height: 2rem;
  margin: 0 0 0.95rem;
  padding: 0 0.9rem;
  line-height: 1;
  font-size: 0.82rem;
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 0.9rem;
}

.detail-icon,
.detail-head .acct-swatch {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  object-fit: contain;
  background: #0d1118;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.detail-name h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.15;
}

.detail-wiki {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--gold);
  font-size: 0.88rem;
}

.detail-copy {
  margin: 0.1rem 0 0.8rem;
  line-height: 1.45;
  white-space: pre-line;
}

.detail-facts {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.detail-fact {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.86rem;
}

.detail-fact-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  background: transparent;
  flex: 0 0 auto;
}

.skill-board {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.75rem;
  overflow-x: auto;
}

.skill-line {
  display: grid;
  gap: 0.4rem;
  width: max-content;
}

.skill-gap {
  width: 48px;
  height: 48px;
}

.upgrade-block {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0.35rem 0 0.75rem;
}

.upgrade-block strong {
  display: block;
  margin-bottom: 0.15rem;
}

.upgrade-block p {
  margin: 0.12rem 0;
}

.upgrade-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: #0d1118;
  border-radius: 0.4rem;
  flex: 0 0 auto;
}

.skill-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

button.skill-ico,
span.skill-ico,
.skill-ico.empty {
  width: 48px;
  height: 48px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #10141c;
}

button.skill-ico,
span.skill-ico {
  display: grid;
  place-items: center;
  padding: 3px;
}

button.skill-ico {
  cursor: pointer;
}

button.skill-ico:hover {
  border-color: var(--gold);
}

button.skill-ico.pet-ico {
  padding: 0;
  overflow: hidden;
}

button.skill-ico.pet-ico .skill-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  transform: scale(1.85);
}

.pet-frame {
  width: 72px;
  height: 72px;
  overflow: hidden;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: #0d1118;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.pet-frame .detail-icon {
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  transform: scale(1.85);
}

.skill-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: transparent;
}

.acct-hero h2 {
  margin: 0;
  font-size: 1.45rem;
}

.acct-dlcs,
.acct-facts,
.fact-row,
.skill-row,
.build-cols,
.track-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.acct-fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.55rem 0.7rem;
  min-width: 9.5rem;
}

.acct-fact b {
  display: block;
  font-size: 1rem;
}

.acct-fact span,
.acct-sub {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
}

.build-cols {
  align-items: flex-start;
}

.build-col {
  flex: 1 1 180px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.5rem 0.6rem;
}

.doll {
  display: grid;
  grid-template-columns: minmax(88px, 120px) minmax(160px, 1fr) minmax(88px, 120px);
  gap: 0.45rem;
  align-items: end;
  max-width: 640px;
}

.doll-col,
.doll-sets {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.doll-sets {
  justify-content: flex-end;
  min-height: 100%;
}

.weapon-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.acct-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-height: 4.6rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #10141c;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.acct-slot span {
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
}

.acct-slot.empty {
  opacity: 0.55;
  cursor: default;
}

.track-row {
  align-items: stretch;
}

.acct-cell.missing img {
  filter: grayscale(1) brightness(0.6);
  opacity: 0.72;
}

.acct-cell.missing {
  color: #9aa3b5;
}

.api-down {
  margin: 0.8rem clamp(0.75rem, 1.5vw, 1.75rem) 0;
  padding: 1rem 1.1rem;
  border: 2px solid #e23b3b;
  border-radius: 0.9rem;
  background: #2a1214;
  color: #ffd7d4;
}

.api-down strong {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.api-down p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.tool-shelf {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

@media (max-width: 900px) {
  .tool-shelf {
    flex-direction: column;
    align-items: flex-start;
  }

  .shelf-tool {
    flex: 0 0 auto;
  }
}

.shelf-tool {
  width: 46px;
  height: 46px;
  padding: 3px;
  border-radius: 0.6rem;
  background: #12161e;
  cursor: pointer;
}

.shelf-tool.at-shared { border: 2px solid #3dce8e; }
.shelf-tool.at-away { border: 2px solid #e23b3b; }

.shelf-tool img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.track-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 180px;
  min-height: 3.4rem;
  padding: 0.35rem 0.6rem;
  border: 1px dashed #8d97a6;
  border-radius: 0.75rem;
  background: var(--card);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.track-box.at-shared { border: 1px dashed #8d97a6; }
.track-box.at-away { border: 2px solid #e23b3b; }

.track-box img {
  width: 40px;
  height: 40px;
}

.track-box b {
  display: block;
}

.track-box small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.acct-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.55);
}

.acct-modal .acct-card {
  width: min(28rem, 100%);
}

#account-view .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  padding: 0.35rem 0.75rem;
}

#account-view .chip.char-chip {
  color: var(--char-color);
}

#account-view .chip.char-chip[aria-pressed="true"] {
  background: #12161e;
  color: var(--char-color);
  box-shadow: inset 0 0 0 2px var(--char-color);
}

.where-box {
  margin-top: 0.85rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--gold);
  border-radius: 0.75rem;
  background: rgba(215, 179, 106, 0.1);
}

.where-box h3 {
  margin: 0 0 0.4rem;
  color: var(--gold);
}

.equip-board {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.equip-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.equip-list .acct-slot {
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.55rem;
  width: 100%;
  min-height: 0;
  padding: 0.35rem 0.5rem;
}

.equip-list .acct-slot span {
  text-align: left;
  font-size: 0.82rem;
}

.equip-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.equip-line {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
}

.equip-line .acct-slot {
  flex: 1 1 72px;
  width: auto;
  max-width: 108px;
  min-width: 0;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 54px);
  grid-auto-rows: 54px;
  gap: 4px;
  justify-content: start;
  align-content: start;
  width: 100%;
}

.slot-grid.fixed-cols,
.slot-grid.locked-cols {
  width: max-content;
  max-width: none;
}

#account-view .chip.chip-idle {
  opacity: 0.45;
}

#account-view .chip.wallet-chip[aria-pressed="true"] {
  box-shadow: 0 0 0 2px #f4f7fb;
}

#account-view .chip.exp-account,
#account-view h3.exp-account { background: #8a6414; color: #fff1c4; }
#account-view .chip.exp-ls2,
#account-view h3.exp-ls2 { background: #6d5a22; color: #f6efc8; }
#account-view .chip.exp-ls3,
#account-view h3.exp-ls3 { background: #7a2458; color: #ffd6ea; }
#account-view .chip.exp-ls4,
#account-view h3.exp-ls4 { background: #4a2d78; color: #ffe7a8; }
#account-view .chip.exp-wvw,
#account-view h3.exp-wvw { background: #1e3f66; color: #d6e6ff; }
#account-view .chip.exp-pvp,
#account-view h3.exp-pvp { background: #8a3d12; color: #ffe4d0; }
#account-view .chip.exp-raid,
#account-view h3.exp-raid { background: #3e2a55; color: #f0e4ff; }
#account-view .chip.exp-other,
#account-view h3.exp-other { background: #3a4250; color: #d5dbe6; }

#account-view h3.wallet-title {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
}

.bag-block.fixed {
  width: max-content;
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
  align-self: center;
  overflow-x: auto;
}

.bag-block.fixed.cat-empty {
  width: calc(10 * 54px + 9 * 4px);
}

.bag-cols {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-left: 0.2rem;
}

.bag-cols strong {
  min-width: 1.4rem;
  text-align: center;
  font-size: 0.85rem;
}

.bag-step {
  min-height: 1.9rem;
  padding: 0 0.55rem;
  border: 0;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.bag-step:disabled {
  opacity: 0.4;
  cursor: default;
}

.inv-slot {
  position: relative;
  width: 54px;
  height: 54px;
  min-width: 54px;
  max-width: 54px;
  min-height: 54px;
  max-height: 54px;
  box-sizing: border-box;
  padding: 3px;
  border: 1px solid #2c3444;
  border-radius: 4px;
  background: #12161e;
  overflow: hidden;
}

.inv-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.inv-slot small {
  position: absolute;
  right: 3px;
  bottom: 0;
  color: #fff;
  font-size: 0.72rem;
  text-shadow: 0 1px 2px #000;
}

.inv-slot.slot-empty {
  background: #1c212c;
  opacity: 0.55;
}

.inv-slot.r-Ascended { border-color: #fb3e8d; }
.inv-slot.r-Legendary { border-color: #a866e0; }
.inv-slot.r-Exotic { border-color: #ffa405; }
.inv-slot.r-Rare { border-color: #f8e04a; }
.inv-slot.r-Masterwork { border-color: #1a9306; }
.inv-slot.r-Fine { border-color: #4a8bdf; }

@media (max-width: 800px) {
  #account-view,
  .acct-people {
    grid-template-columns: 1fr;
  }

  .acct-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
  }

  .title-cols {
    column-count: 2;
  }

  .acct-nav button {
    white-space: nowrap;
  }

  .equip-board {
    grid-template-columns: 1fr;
  }
}
