:root {
  --ink: #f4eed8;
  --muted: #a89f87;
  --panel: #191b22;
  --panel-light: #242630;
  --edge: #565066;
  --gold: #e5b95f;
  --red: #a73543;
  --red-bright: #dc5162;
  --green: #3f9a66;
  --blue: #3477bb;
  --purple: #8e68c4;
  --body-font: ui-monospace, 'Roboto Mono', 'Droid Sans Mono', Consolas, monospace;
  --pixel-font: ui-monospace, 'Roboto Mono', 'Droid Sans Mono', Consolas, monospace;
}

.game-version-shell,
.iwt2-shell,
.iwt2-arena-shell {
  min-height: 100vh;
}

.game-shell.iwt2-arena-shell {
  height: 100vh;
  left: 0;
  margin: 0;
  padding: 0;
  position: fixed;
  top: 0;
  width: 100vw;
}

.game-version-screen,
.iwt2-menu-screen {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1040px;
  padding: 28px 22px;
  width: 100%;
}

.game-version-heading,
.iwt2-menu-heading {
  border-bottom: 2px solid #34343d;
  padding-bottom: 18px;
}

.game-version-heading h1,
.iwt2-menu-heading h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  margin: 0;
}

.game-version-grid,
.iwt2-menu-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.iwt2-menu-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.game-version-card,
.iwt2-menu-card {
  align-items: center;
  background: #151921;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 118px;
  outline: 2px solid #3a4250;
  padding: 12px;
  text-align: left;
}

.game-version-card > span,
.iwt2-menu-card > span {
  align-items: center;
  background: #202938;
  border: 2px solid #090a0d;
  color: #f1c663;
  display: inline-flex;
  font-family: var(--pixel-font);
  font-size: 1.15rem;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.game-version-card strong,
.iwt2-menu-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
}

.game-version-card small,
.iwt2-menu-card small,
.game-version-card p {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 0;
}

.iwt2-arena-layout {
  height: 100vh;
  overflow: hidden;
  padding: 0;
  width: 100vw;
}

.iwt2-arena-stage {
  background: #090c10;
  border: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.iwt2-phaser-host {
  height: 100%;
  width: 100%;
}

.iwt2-phaser-host canvas {
  display: block;
}

.iwt2-arena-rail {
  display: grid;
  gap: 10px;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
}

.iwt2-boss-hud {
  display: grid;
  gap: 6px;
  left: 50%;
  min-width: 310px;
  padding: 8px 12px 10px;
  pointer-events: none;
  position: absolute;
  top: 10px;
  transform: translateX(-50%);
  z-index: 4;
}

.iwt2-boss-hud-row > div:first-child {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.iwt2-boss-hud strong {
  font-size: 0.95rem;
  text-shadow: 0 2px 0 #050608;
}

.iwt2-boss-phase {
  color: var(--muted);
  display: block;
  font-size: 0.58rem;
  height: 12px;
  line-height: 12px;
  margin-top: 2px;
  overflow: hidden;
  text-transform: uppercase;
}

.iwt2-boss-panel,
.iwt2-party-list,
.iwt2-status-panel,
.iwt2-event-log,
.iwt2-list-panel {
  background: #141922;
  border: 2px solid #090a0d;
  outline: 2px solid #34343d;
  padding: 12px;
}

.iwt2-boss-panel h2 {
  margin: 0 0 10px;
}

.iwt2-bar {
  background: #050608;
  border: 1px solid #0a0c10;
  height: 14px;
  overflow: hidden;
  position: relative;
}

.iwt2-bar span {
  display: block;
  height: 100%;
}

.iwt2-bar i {
  background: #58a8ff;
  display: block;
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
}

.iwt2-bar.boss span {
  background: #dc5162;
}

.iwt2-bar.hp span {
  background: #52c47b;
}

.iwt2-bar.mana span {
  background: #4f91e8;
}

.iwt2-party-row .iwt2-bar {
  height: 10px;
  margin-top: 4px;
}

.iwt2-party-list {
  background: rgba(15, 19, 26, 0.88);
  border: 0;
  left: 28px;
  max-height: calc(100% - 112px);
  outline: 0;
  padding: 6px;
  position: absolute;
  top: 28px;
  width: 172px;
  z-index: 4;
  display: grid;
  gap: 8px;
  align-content: start;
  overflow: auto;
}

.iwt2-party-row {
  align-items: center;
  background: #10141b;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 24px minmax(0, 1fr);
  height: 86px;
  min-height: 86px;
  outline: 2px solid transparent;
  padding: 5px;
  text-align: left;
  width: 100%;
}

.iwt2-party-row.has-target-binding {
  grid-template-columns: 28px 24px minmax(0, 1fr);
}

.iwt2-party-row > span {
  align-items: center;
  border: 2px solid #050608;
  color: #fff7df;
  display: inline-flex;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.iwt2-party-row .iwt2-party-target-key {
  background: #050608;
  border-color: #0b0d12;
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 0.52rem;
  height: 24px;
  min-width: 24px;
  padding: 0 2px;
  width: auto;
}

.iwt2-party-row .iwt2-party-target-key .controller-face-icon {
  height: 20px;
  min-width: 20px;
}

.iwt2-party-row-title {
  align-items: baseline;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  min-width: 0;
}

.iwt2-party-row-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iwt2-party-row-title small {
  flex: 0 0 auto;
}

.iwt2-party-row strong,
.iwt2-status-panel strong {
  display: block;
  font-size: 0.72rem;
}

.iwt2-party-row small,
.iwt2-status-panel small,
.iwt2-event-log small,
.iwt2-boss-panel small {
  color: var(--muted);
  display: block;
  font-size: 0.62rem;
  line-height: 1.35;
}

.iwt2-party-effects {
  align-items: center;
  display: flex;
  gap: 3px;
  height: 16px;
  margin-top: 4px;
  overflow: hidden;
}

.iwt2-effect-badge {
  border: 1px solid #050608;
  color: #fff7df;
  display: inline-block;
  flex: 0 1 auto;
  font-size: 0.52rem;
  line-height: 12px;
  max-width: 74px;
  overflow: hidden;
  padding: 0 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iwt2-effect-badge.hot {
  background: #256f4c;
}

.iwt2-effect-badge.shield {
  background: #245c9f;
}

.iwt2-party-damage {
  height: 12px;
  overflow: hidden;
  white-space: nowrap;
}

.iwt2-party-row.selected {
  background: #18202b;
}

.iwt2-event-log {
  bottom: 10px;
  display: none;
}

.iwt2-ability-bar {
  bottom: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, 42px);
  justify-content: center;
  left: 50%;
  max-width: 308px;
  position: absolute;
  transform: translateX(-50%);
  width: 308px;
  z-index: 4;
}

.iwt2-ability-button {
  align-items: center;
  background: rgba(16, 20, 27, 0.9);
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  min-height: 50px;
  outline: 2px solid #34343d;
  padding: 4px;
  position: relative;
  text-align: center;
}

.iwt2-ability-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.85);
  opacity: 0.55;
}

.iwt2-ability-button > span {
  align-items: center;
  background: #253244;
  border: 2px solid #050608;
  color: #fff4a8;
  display: inline-flex;
  font-size: 1rem;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.iwt2-ability-button strong {
  color: #fff4a8;
  font-size: 0.56rem;
  position: absolute;
  right: 3px;
  top: 1px;
}

.iwt2-ability-button i {
  color: var(--muted);
  display: block;
  font-size: 0.5rem;
  font-style: normal;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.iwt2-arena-overlay {
  align-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(229, 185, 95, 0.16), transparent 32%),
    rgba(8, 10, 13, 0.84);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 18px;
  position: absolute;
  text-align: center;
  z-index: 5;
}

.iwt2-result-panel {
  background: linear-gradient(180deg, rgba(28, 33, 43, 0.98), rgba(12, 15, 20, 0.98));
  border: 2px solid #0a0c10;
  box-shadow: 0 0 0 2px #45414a, 0 18px 42px rgba(0, 0, 0, 0.5);
  display: grid;
  gap: 12px;
  justify-items: center;
  max-width: 520px;
  min-width: min(520px, calc(100vw - 36px));
  padding: 20px 22px 18px;
}

.iwt2-result-panel .eyebrow {
  color: #f1c663;
  font-size: 0.72rem;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}

.iwt2-result-panel h1 {
  color: #fff7df;
  font-size: 1.8rem;
  line-height: 1;
  margin: 0;
  text-shadow: 0 3px 0 #050608;
}

.iwt2-result-crest {
  align-items: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--boss-color) 72%, #050608), #10141b);
  border: 2px solid #050608;
  box-shadow: 0 0 0 2px var(--boss-accent), 0 10px 24px rgba(0, 0, 0, 0.35);
  color: #fff7df;
  display: inline-flex;
  font-size: 1.7rem;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  line-height: 1;
  width: 58px;
}

.iwt2-result-crest span {
  transform: translateY(-1px);
}

.iwt2-result-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.iwt2-result-summary span,
.iwt2-result-reward span {
  background: rgba(8, 10, 13, 0.72);
  border: 1px solid #2f3440;
  color: var(--muted);
  display: grid;
  font-size: 0.62rem;
  gap: 3px;
  min-height: 48px;
  padding: 7px 8px;
  place-items: center;
  text-transform: uppercase;
}

.iwt2-result-summary strong {
  color: #fff7df;
  display: block;
  font-size: 1rem;
  line-height: 1;
}

.iwt2-result-reward {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.iwt2-result-reward span {
  color: #fff4a8;
  display: inline-flex;
  min-height: 30px;
  padding: 7px 10px;
}

.iwt2-arena-overlay.is-defeat {
  background:
    radial-gradient(circle at 50% 42%, rgba(167, 53, 67, 0.18), transparent 34%),
    rgba(8, 10, 13, 0.88);
}

.iwt2-arena-overlay.is-paused {
  background: rgba(8, 10, 13, 0.72);
}

.iwt2-arena-overlay.is-defeat .iwt2-result-panel .eyebrow {
  color: #ff8a96;
}

.iwt2-result-hint {
  color: var(--muted);
  font-size: 0.58rem;
}

.iwt2-overlay-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

.iwt2-overlay-actions button {
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  min-height: 44px;
  min-width: 120px;
  outline: 2px solid #34343d;
  padding: 0 14px;
}

.iwt2-result-button.is-primary {
  background: #263448;
  color: #fff4a8;
}

.iwt2-result-button.is-secondary {
  background: #141922;
  color: var(--ink);
}

.iwt2-result-button.game-selected {
  background: #2b3b52;
  color: #fff7df;
}

.iwt2-list-screen,
.iwt2-screen-shell {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1040px;
  padding: 24px 22px 36px;
  width: 100%;
}

.iwt2-list-panel {
  display: grid;
  gap: 10px;
}

.iwt2-list-row {
  align-items: center;
  background: #10141b;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 44px;
  padding: 10px;
}

.iwt2-profile-grid,
.iwt2-settings-panel,
.iwt2-customize-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.iwt2-loadout-preview {
  display: grid;
  gap: 12px;
}

.iwt2-loadout-preview > div {
  display: grid;
  gap: 8px;
}

.iwt2-loadout-preview h2 {
  margin: 0;
}

.iwt2-loadout-preview span {
  color: var(--muted);
  font-size: 0.75rem;
}

.iwt2-action-list,
.iwt2-info-list {
  display: grid;
  gap: 10px;
}

.iwt2-action-row,
.iwt2-info-row {
  align-items: center;
  background: #10141b;
  border: 2px solid #090a0d;
  color: var(--ink);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 64px;
  outline: 2px solid #34343d;
  padding: 12px 14px;
  text-align: left;
}

.iwt2-action-row {
  cursor: pointer;
}

.iwt2-info-row {
  cursor: default;
}

.iwt2-action-row strong,
.iwt2-info-row strong {
  display: block;
  font-size: 0.95rem;
}

.iwt2-action-row small,
.iwt2-info-row small {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  line-height: 1.35;
  margin-top: 4px;
}

.iwt2-action-row em,
.iwt2-info-row em {
  color: #fff4a8;
  font-style: normal;
  white-space: nowrap;
}

.iwt2-action-row:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.72;
}

.iwt2-action-row:disabled em {
  color: var(--muted);
}

.iwt2-action-row.selected,
.iwt2-menu-card.game-selected {
  background: #1c2633;
  outline-color: #e5b95f;
}

.iwt2-controller-preview {
  align-content: center;
  background: #141922;
  border: 2px solid #090a0d;
  display: grid;
  gap: 14px;
  justify-items: center;
  min-height: 160px;
  outline: 2px solid #34343d;
  padding: 18px;
}

.iwt2-controller-preview > span {
  color: var(--ink);
  font-weight: 800;
}

.iwt2-bottom-display {
  height: 100vh;
  overflow: hidden;
  width: 100vw;
}

.iwt2-bottom-display.dual-bottom-display {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.iwt2-bottom-display .dual-control-chip {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  outline: 2px solid #494756;
}


@media (max-width: 760px) {
  .game-version-grid,
  .iwt2-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-version-screen,
  .iwt2-menu-screen {
    padding: 22px 14px;
  }

  .game-version-card,
  .iwt2-menu-card {
    min-height: 130px;
  }

  .iwt2-profile-grid,
  .iwt2-settings-panel,
  .iwt2-customize-layout {
    grid-template-columns: 1fr;
  }

  .iwt2-arena-layout {
    max-height: none;
  }

  .iwt2-arena-rail {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .iwt2-party-list {
    max-height: 148px;
    width: 172px;
  }

  .iwt2-ability-bar {
    grid-template-columns: repeat(6, 36px);
    width: 256px;
  }

  .iwt2-ability-button {
    min-height: 46px;
  }

  .iwt2-ability-button > span {
    height: 28px;
    width: 28px;
  }

  .iwt2-arena-overlay {
    padding: 12px;
  }

  .iwt2-result-panel {
    gap: 9px;
    max-width: 420px;
    min-width: min(420px, calc(100vw - 24px));
    padding: 14px;
  }

  .iwt2-result-panel h1 {
    font-size: 1.35rem;
  }

  .iwt2-result-crest {
    font-size: 1.35rem;
    height: 46px;
    width: 46px;
  }

  .iwt2-result-summary span {
    min-height: 42px;
  }

  .iwt2-result-reward span {
    min-height: 28px;
  }
}

@media (max-width: 1000px) and (max-height: 620px) {
  .game-shell.iwt2-shell {
    padding: 6px 0;
    width: min(100%, calc(100% - 20px));
  }

  .iwt2-shell .app-header {
    min-height: 44px;
    padding: 6px 10px;
  }

  .iwt2-shell .brand-button strong {
    font-size: 10px;
  }

  .iwt2-shell .character-summary {
    gap: 7px;
  }

  .iwt2-shell .character-summary strong {
    font-size: 14px;
  }

  .iwt2-shell .character-summary small {
    font-size: 6px;
  }

  .iwt2-menu-screen {
    flex: 1;
    gap: 10px;
    min-height: 0;
    overflow: hidden;
    padding: 10px 12px;
  }

  .iwt2-menu-heading {
    padding-bottom: 8px;
  }

  .iwt2-menu-heading .eyebrow {
    font-size: 6px;
    margin-bottom: 4px;
  }

  .iwt2-menu-heading h1 {
    font-size: 1.55rem;
  }

  .iwt2-menu-grid {
    gap: 10px;
  }

  .iwt2-menu-card {
    gap: 8px;
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 92px;
    padding: 8px;
  }

  .iwt2-menu-card > span {
    font-size: 0.95rem;
    height: 42px;
    width: 42px;
  }

  .iwt2-menu-card strong {
    font-size: 0.8rem;
    margin-bottom: 3px;
  }

  .iwt2-menu-card small {
    font-size: 0.64rem;
    line-height: 1.25;
  }

  .iwt2-screen-shell {
    flex: 1;
    gap: 10px;
    margin-top: 8px;
    max-width: none;
    min-height: 0;
    overflow: hidden;
    padding: 10px 12px;
  }

  .iwt2-screen-shell .screen-heading {
    padding-bottom: 8px;
  }

  .iwt2-screen-shell .screen-heading .eyebrow {
    font-size: 6px;
    margin-bottom: 4px;
  }

  .iwt2-screen-shell .screen-heading h1 {
    font-size: 17px;
    line-height: 1.1;
  }

  .iwt2-screen-shell .back-button {
    min-height: 30px;
    padding: 5px 9px;
  }

  .iwt2-action-list,
  .iwt2-info-list {
    gap: 7px;
    min-height: 0;
    overflow-y: auto;
    padding: 3px;
  }

  .iwt2-action-row,
  .iwt2-info-row {
    gap: 8px;
    min-height: 54px;
    padding: 8px 10px;
  }

  .iwt2-action-row strong,
  .iwt2-info-row strong {
    font-size: 0.78rem;
  }

  .iwt2-action-row small,
  .iwt2-info-row small {
    font-size: 0.62rem;
    line-height: 1.2;
    margin-top: 2px;
  }

  .iwt2-profile-grid,
  .iwt2-settings-panel,
  .iwt2-customize-layout {
    min-height: 0;
    overflow: hidden;
  }

  .iwt2-settings-panel,
  .iwt2-customize-layout {
    gap: 10px;
  }

  .iwt2-settings-panel > *,
  .iwt2-customize-layout > *,
  .iwt2-loadout-preview {
    min-height: 0;
    overflow: hidden;
  }

  .iwt2-loadout-preview {
    gap: 8px;
  }

  .iwt2-loadout-preview h2 {
    font-size: 12px;
    line-height: 1.1;
  }

  .iwt2-loadout-preview span {
    font-size: 0.62rem;
  }

  .iwt2-controller-preview {
    min-height: 112px;
    padding: 10px;
  }

  .iwt2-boss-hud {
    min-width: 280px;
    padding: 6px 10px 8px;
    top: 6px;
  }

  .iwt2-boss-hud strong {
    font-size: 0.82rem;
  }

  .iwt2-boss-phase {
    font-size: 0.5rem;
    height: 10px;
    line-height: 10px;
  }

  .iwt2-party-list {
    gap: 5px;
    left: 10px;
    max-height: calc(100% - 84px);
    overflow: hidden;
    padding: 4px;
    top: 10px;
    width: 154px;
  }

  .iwt2-party-row {
    gap: 5px;
    grid-template-columns: 20px minmax(0, 1fr);
    height: 62px;
    min-height: 62px;
    padding: 4px;
  }

  .iwt2-party-row.has-target-binding {
    grid-template-columns: 24px 20px minmax(0, 1fr);
  }

  .iwt2-party-row > span,
  .iwt2-party-row .iwt2-party-target-key {
    height: 20px;
    min-width: 20px;
    width: 20px;
  }

  .iwt2-party-row .iwt2-party-target-key .controller-face-icon {
    height: 16px;
    min-width: 16px;
  }

  .iwt2-party-row-title {
    gap: 4px;
  }

  .iwt2-party-row strong {
    font-size: 0.62rem;
  }

  .iwt2-party-row small {
    font-size: 0.52rem;
    line-height: 1.15;
  }

  .iwt2-party-row .iwt2-bar {
    height: 7px;
    margin-top: 2px;
  }

  .iwt2-party-effects {
    height: 10px;
    margin-top: 2px;
  }

  .iwt2-effect-badge {
    font-size: 0.44rem;
    line-height: 9px;
    padding: 0 2px;
  }

  .iwt2-party-damage {
    display: none;
  }

  .iwt2-ability-bar {
    bottom: 8px;
    gap: 8px;
    grid-template-columns: repeat(6, 36px);
    max-width: 256px;
    width: 256px;
  }

  .iwt2-ability-button {
    min-height: 44px;
    padding: 3px;
  }

  .iwt2-ability-button > span {
    font-size: 0.9rem;
    height: 24px;
    width: 24px;
  }

  .iwt2-ability-button strong {
    font-size: 0.5rem;
  }

  .iwt2-ability-button i {
    font-size: 0.46rem;
  }
}

.combat-touch-lock-status {
  background: #101216;
  border: 2px solid #d9b55a;
  bottom: 18px;
  box-shadow: 4px 4px 0 #050609;
  color: #fff7df;
  font-family: var(--pixel-font);
  font-size: 9px;
  left: 50%;
  padding: 10px 12px;
  pointer-events: none;
  position: fixed;
  transform: translateX(-50%);
  z-index: 80;
}

* {
  box-sizing: border-box;
}

.sr-only {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

button {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #fff4a8 !important;
  box-shadow: 0 0 0 5px #8b6726, 0 0 18px rgba(229, 185, 95, 0.65);
}

html[data-input-device='controller'] button:focus,
html[data-input-device='controller'] input:focus,
html[data-input-device='controller'] select:focus,
html[data-input-device='controller'] textarea:focus,
html[data-input-device='controller'] [tabindex]:focus {
  outline: 3px solid #fff4a8 !important;
  box-shadow: 0 0 0 5px #8b6726, 0 0 18px rgba(229, 185, 95, 0.65);
}

html[data-input-device='controller'] [data-game-nav-active='true'] button:focus:not(.game-selected),
html[data-input-device='controller'] [data-game-nav-active='true'] [tabindex]:focus:not(.game-selected) {
  outline: 2px solid #42414c !important;
  box-shadow: none;
}

.game-selected {
  outline: 3px solid #fff4a8 !important;
  box-shadow: 0 0 0 5px #8b6726, 0 0 18px rgba(229, 185, 95, 0.65) !important;
}

.settings-heading {
  align-items: end;
  border-bottom: 2px solid #34343d;
  display: flex;
  justify-content: space-between;
  padding: 12px 0 22px;
}

.settings-heading > p {
  color: var(--muted);
  font-size: 19px;
}

.binding-tabs {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin: 22px 0;
}

.binding-tabs button,
.binding-list button {
  background: #15171d;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  outline: 2px solid #41404a;
}

.binding-tabs button {
  font-family: var(--pixel-font);
  font-size: 8px;
  min-height: 48px;
}

.binding-tabs button.selected {
  color: var(--gold);
  outline-color: var(--gold);
}

.binding-list {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.binding-list button {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 13px;
  text-align: left;
}

.binding-list button:hover,
.binding-list button.listening {
  outline-color: var(--gold);
}

.binding-list button > span {
  color: var(--muted);
  font-size: 18px;
}

.binding-list kbd {
  align-items: center;
  color: var(--gold);
  display: inline-flex;
  font-family: var(--pixel-font);
  font-size: 7px;
  justify-content: flex-end;
  min-height: 25px;
  text-align: right;
}

.controller-face-icon {
  --button-color: var(--gold);
  align-items: center;
  background: var(--button-color);
  border: 2px solid #07080a;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 2px 0 #07080a;
  color: #fff8e6;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  line-height: 1;
  min-width: 24px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
  vertical-align: middle;
}

.controller-face-playstation {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--button-color);
  font-size: 25px;
  height: 26px;
  min-width: 26px;
  text-shadow: 0 1px 0 #07080a, 0 0 8px rgba(0, 0, 0, 0.5);
}

.controller-face-nintendo {
  border-color: #fff8e6;
}

.settings-footer {
  align-items: center;
  border-top: 2px solid #34343d;
  color: var(--muted);
  display: flex;
  font-size: 18px;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 18px;
}

.controller-preferences {
  align-items: center;
  background: #111319;
  border: 2px solid #090a0d;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 22px;
  outline: 2px solid #41404a;
  padding: 18px;
}

.controller-preferences p:not(.eyebrow) {
  color: var(--muted);
  font-size: 17px;
  margin-top: 6px;
}

.controller-preferences button,
.controller-icon-options {
  background: #15171d;
  border: 2px solid #090a0d;
  color: var(--ink);
  outline: 2px solid #41404a;
}

.controller-preferences button {
  cursor: pointer;
  min-height: 42px;
  padding: 8px 12px;
}

.controller-preferences button.selected {
  color: var(--gold);
  outline-color: var(--gold);
}

.controller-icon-options {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(140px, 1fr) repeat(3, minmax(135px, auto));
  padding: 8px;
}

.controller-icon-options > span {
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 8px;
  padding-left: 7px;
}

.controller-icon-options button {
  align-items: center;
  display: flex;
  font-family: var(--pixel-font);
  font-size: 7px;
  gap: 8px;
  justify-content: center;
}

.controller-style-preview {
  align-items: center;
  display: inline-grid;
  gap: 3px;
  grid-auto-flow: column;
}

.controller-style-preview .controller-face-icon {
  height: 21px;
  min-width: 21px;
}

.controller-style-preview .controller-face-playstation {
  font-size: 22px;
}

.controller-style-name {
  color: var(--ink);
  line-height: 1.3;
}

.dual-screen-settings {
  background: #111319;
  border: 2px solid #090a0d;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 12px 0 24px;
  outline: 2px solid #41404a;
  padding: 20px;
}

.dual-screen-settings p:not(.eyebrow) {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.2;
  margin-top: 8px;
  max-width: 680px;
}

.dual-screen-settings > small {
  color: var(--muted);
  font-size: 16px;
  grid-column: 1 / -1;
}

.android-display-list {
  display: grid;
  gap: 7px;
  grid-column: 1 / -1;
}

.android-display-list span {
  background: #090b10;
  color: var(--muted);
  display: flex;
  font-size: 16px;
  gap: 10px;
  padding: 8px 10px;
}

.android-display-list strong {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 7px;
}

.dual-screen-actions {
  display: grid;
  gap: 9px;
  min-width: 260px;
}

.dual-screen-actions button,
.dual-bottom-status button,
.dual-bottom-display button,
.dual-top-game-toolbar button {
  background: #242630;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 7px;
  min-height: 44px;
  outline: 2px solid #4b4855;
  padding: 8px 14px;
}

.dual-screen-actions button.selected,
.dual-bottom-status.connected {
  outline-color: var(--green);
}

.binding-capture,
.dual-startup-prompt,
.controller-keyboard-backdrop {
  align-items: center;
  background: rgba(5, 6, 9, 0.88);
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 100;
}

.binding-capture > div,
.dual-startup-prompt > section {
  background: var(--panel);
  border: 3px solid #090a0d;
  box-shadow: 8px 8px 0 #050609;
  max-width: 480px;
  outline: 2px solid var(--gold);
  padding: 30px;
  text-align: center;
  width: calc(100% - 32px);
}

.binding-capture p:not(.eyebrow) {
  color: var(--muted);
  font-size: 21px;
  margin: 18px 0;
}

.dual-startup-prompt p:not(.eyebrow) {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.2;
  margin-top: 12px;
}

.dual-startup-prompt small {
  color: var(--muted);
  display: block;
  font-size: 16px;
  margin-top: 12px;
}

.dual-startup-prompt div {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 22px;
}

.binding-capture button,
.dual-startup-prompt button,
.controller-keyboard button {
  background: #242630;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  outline: 2px solid #4b4855;
}

.binding-capture button {
  min-height: 44px;
  padding: 8px 24px;
}

.dual-startup-prompt button {
  font-family: var(--pixel-font);
  font-size: 8px;
  min-height: 48px;
  padding: 10px 14px;
}

.dual-startup-prompt button:first-child {
  outline-color: var(--green);
}

.controller-keyboard {
  background: var(--panel);
  border: 3px solid #090a0d;
  box-shadow: 8px 8px 0 #050609;
  max-width: 820px;
  outline: 2px solid var(--gold);
  padding: 20px;
  width: calc(100% - 28px);
}

.controller-keyboard-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.controller-keyboard-heading strong {
  display: block;
  font-size: 21px;
  max-width: 650px;
  min-height: 25px;
  overflow: hidden;
}

.controller-keyboard-heading button {
  min-height: 42px;
  padding: 8px 18px;
}

.controller-keyboard-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(10, 1fr);
}

.controller-keyboard-grid button {
  font-family: var(--pixel-font);
  font-size: 9px;
  min-height: 43px;
}

.controller-keyboard-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 2fr 1.5fr 1fr;
  margin-top: 10px;
}

.controller-keyboard-actions button {
  min-height: 45px;
}

.controller-keyboard-actions button.active {
  color: var(--gold);
  outline-color: var(--gold);
}

.target-controls {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-family: var(--pixel-font);
  font-size: 6px;
  gap: 18px;
  justify-content: flex-end;
  margin: 8px 0 10px;
}

.target-controls span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.dual-bottom-shell {
  width: min(1220px, calc(100% - 20px));
}

.dual-bottom-shell > .topbar {
  padding-bottom: 14px;
  padding-top: 14px;
}

.dual-bottom-status {
  align-items: center;
  background: var(--panel);
  border: 3px solid #0c0d11;
  box-shadow: 7px 7px 0 #08090c;
  display: grid;
  gap: 20px;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  margin-top: 18px;
  outline: 2px solid var(--red);
  padding: 14px 18px;
}

.dual-bottom-status strong {
  color: var(--red-bright);
  font-family: var(--pixel-font);
  font-size: 9px;
}

.dual-bottom-status.connected strong {
  color: #76d39a;
}

.dual-bottom-fallback {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(150px, 1fr) auto;
}

.dual-bottom-fallback > span,
.dual-bottom-fallback > small {
  color: var(--muted);
}

.dual-bottom-actions {
  margin-top: 18px;
  min-height: 440px;
  padding: 28px;
}

.dual-bottom-actions .active-target-card {
  min-width: 390px;
}

.dual-bottom-actions .mana-wrap {
  width: min(520px, 48%);
}

.dual-bottom-actions .spell {
  min-height: 190px;
}

.dual-bottom-actions .spell-icon {
  height: 66px;
  margin-top: 25px;
  width: 66px;
}

.dual-bottom-actions .spell strong {
  font-size: 19px;
}

.dual-bottom-actions .spell small {
  font-size: 17px;
}

.dual-top-shell {
  background:
    linear-gradient(rgba(8, 9, 12, 0.91), rgba(8, 9, 12, 0.91)),
    repeating-linear-gradient(0deg, #171922 0 2px, #11131a 2px 4px);
  color: var(--ink);
  display: grid;
  gap: 16px;
  grid-template-rows: auto auto 1fr auto;
  min-height: 100vh;
  padding: 18px;
}

.dual-top-header,
.dual-top-enemy,
.dual-top-party,
.dual-top-log,
.dual-top-waiting > section {
  background: var(--panel);
  border: 3px solid #0c0d11;
  box-shadow: 7px 7px 0 #08090c;
  outline: 2px solid var(--edge);
}

.dual-top-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
}

.dual-top-header h1 {
  font-size: clamp(17px, 2.1vw, 28px);
}

.dual-top-progress {
  align-items: center;
  display: flex;
  gap: 18px;
}

.dual-top-progress > span {
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 8px;
}

.dual-top-enemy {
  align-items: center;
  display: flex;
  gap: 14px;
  padding: 10px 14px;
}

.dual-top-enemy .enemy-portrait {
  flex-basis: 84px;
  height: 84px;
}

.dual-top-enemy .bar {
  height: 25px;
}

.dual-top-party {
  min-height: 0;
  padding: 10px 14px;
}

.dual-top-party-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dual-top-party-grid.raid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.dual-top-member {
  background: var(--panel-light);
  border: 2px solid #0a0b0e;
  contain: layout paint style;
  min-height: 120px;
  outline: 2px solid #3a3944;
  padding: 14px;
  position: relative;
}

.dual-top-member.selected {
  background: #29291f;
  outline: 3px solid var(--gold);
}

.dual-top-member.dead {
  filter: grayscale(1);
  opacity: 0.48;
}

.dual-top-member .member-header strong {
  font-size: 20px;
}

.dual-top-member .member-header small {
  font-size: 17px;
}

.dual-top-member .bar {
  height: 22px;
  margin-top: 14px;
}

.dual-top-member .member-target-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0a0b0e;
  border: 2px solid #3a3944;
  border-radius: 6px;
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
  padding: 4px 10px;
  text-transform: uppercase;
  white-space: nowrap;
  gap: 4px;
}

.dual-top-member .member-target-key kbd {
  font-family: var(--pixel-font);
  font-size: inherit;
}

.dual-top-member .member-target-key svg {
  display: inline-block;
  vertical-align: middle;
}

.dual-top-party-grid.raid .dual-top-member {
  min-height: 72px;
  padding: 8px;
}

.dual-top-party-grid.raid .member-header {
  gap: 5px;
}

.dual-top-party-grid.raid .member-header strong {
  font-size: 16px;
}

.dual-top-party-grid.raid .member-header small {
  display: none;
}

.dual-top-party-grid.raid .dual-top-member .bar {
  height: 18px;
  margin-top: 7px;
}

.dual-top-party-grid.raid .member-effects {
  margin-top: 5px;
}

.dual-top-log {
  display: none;
  gap: 14px;
  min-height: 36px;
  overflow: hidden;
  padding: 6px 14px;
}

.dual-top-log span {
  color: var(--muted);
  flex: 1;
  font-size: 17px;
}

.dual-top-log .heal {
  color: #78d79d;
}

.dual-top-log .danger {
  color: #ff8190;
}

.dual-top-log .loot {
  color: var(--gold);
}

.dual-top-waiting {
  align-items: center;
  display: flex;
  justify-content: center;
}

.dual-top-waiting > section {
  padding: 40px;
  text-align: center;
}

.dual-top-waiting p:not(.eyebrow) {
  color: var(--muted);
  font-size: 22px;
  margin: 15px 0;
}

.game-shell.dual-top-game-shell {
  height: 100dvh;
  margin: 0 auto;
  padding: 10px;
  width: 100%;
}

.dual-top-game-toolbar {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-family: var(--pixel-font);
  font-size: 7px;
  gap: 12px;
  justify-content: flex-end;
  min-height: 42px;
}

.dual-top-game-toolbar > span {
  margin-right: auto;
}

.dual-top-game-toolbar button {
  min-height: 34px;
}

.dual-top-main {
  display: grid;
  gap: 10px;
  height: calc(100dvh - 20px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.dual-top-main.pvp-roguelike-dual-top {
  grid-template-rows: auto minmax(0, 1fr);
}

.dual-top-main.stadium-dual-top {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.dual-top-main .dual-top-enemy,
.dual-top-main .dual-top-party,
.dual-top-main .dual-top-log {
  margin: 0;
  width: 100%;
}

.dual-top-main.pvp-roguelike-dual-top .dual-top-enemy {
  align-items: center;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(142px, 152px);
  min-height: 84px;
  padding: 8px 10px;
}

.dual-top-main.pvp-roguelike-dual-top .enemy-portrait {
  flex-basis: auto;
  height: 58px;
}

.dual-top-main.pvp-roguelike-dual-top .enemy-info p {
  display: none;
}

.dual-top-main.pvp-roguelike-dual-top .bar-label {
  font-size: 17px;
}

.dual-top-main.pvp-roguelike-dual-top .dual-top-enemy .bar {
  height: 18px;
}

.dual-top-main.pvp-roguelike-dual-top .enemy-info .dual-top-resource {
  justify-self: start;
  margin-top: 5px;
  min-width: 0;
  width: min(220px, 100%);
}

.dual-top-main.pvp-roguelike-dual-top .enemy-info .dual-top-resource strong {
  font-size: 7px;
  margin-bottom: 4px;
  text-align: left;
}

.dual-top-main.pvp-roguelike-dual-top .enemy-info .dual-top-resource .bar {
  height: 8px;
}

.dual-top-main .dual-top-party-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dual-top-main .dual-top-party-grid.raid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dual-top-main .dual-top-member {
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.dual-top-main .dual-top-member:hover {
  outline-color: var(--gold);
}

.dual-top-spell-strip {
  align-items: center;
  background: var(--panel);
  border: 3px solid #0c0d11;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, 54px) minmax(180px, 1fr);
  min-height: 64px;
  outline: 2px solid var(--edge);
  padding: 8px 10px;
}

.dual-top-cooldowns {
  align-content: center;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, 46px);
  justify-content: end;
}

.dual-top-side-status {
  align-items: end;
  display: grid;
  gap: 4px;
  justify-items: end;
}

.dual-top-spell {
  align-items: center;
  background: #20232c;
  border: 2px solid #08090c;
  color: var(--ink);
  display: flex;
  height: 48px;
  justify-content: center;
  min-width: 0;
  outline: 2px solid #4d4c58;
  padding: 0;
  position: relative;
}

.dual-top-cooldowns .dual-top-spell {
  height: 30px;
  width: 46px;
}

.dual-top-spell:not(:disabled) {
  cursor: pointer;
}

.dual-top-spell:disabled {
  opacity: 0.62;
}

.dual-top-spell .spell-icon {
  font-size: 20px;
  height: 32px;
  margin: 0;
  width: 32px;
}

.dual-top-cooldowns .dual-top-spell .spell-icon {
  font-size: 14px;
  height: 22px;
  width: 22px;
}

.dual-top-spell > i {
  background: rgba(0, 0, 0, 0.58);
  bottom: 0;
  display: block;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
}

.dual-top-spell > small {
  color: #fff4a8;
  font-family: var(--pixel-font);
  font-size: 10px;
  position: absolute;
}

.dual-top-cooldowns .dual-top-spell > small {
  font-size: 7px;
}

.dual-top-resource {
  align-self: center;
  color: #82bfff;
  font-family: var(--pixel-font);
  font-size: 8px;
  justify-self: end;
  min-width: 220px;
  width: min(280px, 100%);
}

.dual-top-side-status .dual-top-resource {
  min-width: 0;
  width: 100%;
}

.dual-top-side-status .dual-top-resource strong {
  font-size: 7px;
  margin-bottom: 4px;
  text-align: right;
}

.dual-top-side-status .dual-top-resource .bar {
  height: 8px;
}

.dual-top-resource strong {
  display: block;
  margin-bottom: 6px;
  text-align: right;
}

.dual-top-resource .bar {
  height: 14px;
}

.dual-bottom-display {
  background:
    linear-gradient(rgba(8, 9, 12, 0.91), rgba(8, 9, 12, 0.91)),
    repeating-linear-gradient(0deg, #171922 0 2px, #11131a 2px 4px);
  color: var(--ink);
  display: grid;
  gap: 10px;
  grid-template-rows: auto auto auto 1fr;
  min-height: 100vh;
  padding: 10px;
}

.pvp-opponent-bottom-display {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.dual-controls-header,
.dual-controls-resource,
.dual-controls-targets,
.dual-controls-spells,
.setup-bottom-summary,
.setup-bottom-stats,
.dual-bottom-waiting > section {
  background: var(--panel);
  border: 3px solid #0c0d11;
  outline: 2px solid var(--edge);
}

.dual-controls-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 70px;
  padding: 10px 16px;
}

.dual-controls-header h1 {
  font-size: clamp(14px, 2.2vw, 23px);
}

.dual-controls-header small {
  color: var(--muted);
  display: block;
  font-size: 14px;
  margin-top: 4px;
}

.dual-opponent-progress,
.dual-opponent-arena,
.dual-opponent-effects {
  background: var(--panel);
  border: 3px solid #0c0d11;
  outline: 2px solid var(--edge);
}

.dual-opponent-progress {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(130px, 0.45fr) minmax(0, 1fr);
  padding: 10px 14px;
}

.dual-opponent-progress strong {
  color: var(--ink);
  font-size: 19px;
}

.dual-opponent-progress .bar {
  height: 22px;
}

.dual-opponent-arena {
  padding: 7px;
}

.dual-opponent-arena-field {
  background:
    linear-gradient(rgba(23, 29, 36, 0.96), rgba(23, 29, 36, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(90, 108, 126, 0.28) 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(90, 108, 126, 0.28) 40px);
  border: 2px solid #3c4a59;
  border-radius: 6px;
  max-height: 138px;
  min-height: 112px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.dual-opponent-arena-entity {
  align-items: center;
  border: 2px solid #0a0c10;
  border-radius: 999px;
  color: #fff7df;
  display: flex;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  min-height: 12px;
  min-width: 12px;
  position: absolute;
  transform: translate(-50%, -50%);
}

.dual-opponent-arena-entity.boss {
  border-color: #fff0b8;
  border-radius: 45%;
  font-size: 12px;
  min-height: 18px;
  min-width: 24px;
}

.dual-opponent-arena-entity.healer {
  box-shadow: 0 0 0 3px rgba(255, 244, 168, 0.84);
}

.dual-opponent-party-grid {
  background: var(--panel);
  border: 3px solid #0c0d11;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 0;
  outline: 2px solid var(--edge);
  overflow: hidden;
  padding: 10px;
}

.dual-opponent-party-grid.raid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow-y: auto;
}

.dual-opponent-member {
  background: var(--panel-light);
  border: 2px solid #0a0b0e;
  contain: layout paint style;
  min-width: 0;
  outline: 2px solid #3a3944;
  padding: 9px;
}

.dual-opponent-member.dead {
  filter: grayscale(1);
  opacity: 0.5;
}

.dual-opponent-member .member-header {
  gap: 5px;
}

.dual-opponent-member .member-header strong {
  font-size: 17px;
}

.dual-opponent-member .member-header small {
  font-size: 13px;
}

.dual-opponent-member .bar {
  height: 14px;
  margin-top: 7px;
}

.dual-opponent-party-grid.raid .dual-opponent-member {
  padding: 7px;
}

.dual-opponent-party-grid.raid .member-header strong {
  font-size: 15px;
}

.dual-opponent-party-grid.raid .member-header small {
  display: none;
}

.dual-opponent-party-grid.raid .dual-opponent-member .bar {
  height: 12px;
}

.dual-opponent-effects {
  color: var(--muted);
  display: grid;
  font-size: 14px;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  padding: 8px 12px;
}

.dual-controls-progress {
  color: var(--muted);
  display: grid;
  gap: 4px;
  font-family: var(--pixel-font);
  font-size: 7px;
  text-align: right;
}

.setup-bottom-display {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.setup-bottom-summary {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 82px minmax(0, 1fr);
  min-height: 0;
  padding: 12px;
}

.setup-bottom-summary .dungeon-art {
  height: 78px;
  width: 78px;
}

.setup-bottom-summary h2 {
  font-size: 14px;
}

.setup-bottom-summary p:not(.eyebrow),
.setup-bottom-summary small {
  color: var(--muted);
  display: block;
  font-size: 16px;
  line-height: 1.15;
  margin-top: 6px;
}

.setup-bottom-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 10px;
}

.setup-bottom-stats > div {
  background: #111217;
  border: 2px solid #090a0d;
  padding: 8px;
  text-align: center;
}

.setup-bottom-stats dt {
  color: var(--muted);
  font-size: 13px;
}

.setup-bottom-stats dd {
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 9px;
  margin: 4px 0 0;
}

.dual-controls-resource {
  align-items: center;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr);
  padding: 12px 16px;
}

.dual-controls-resource strong {
  font-size: 20px;
}

.dual-controls-mana > span {
  color: var(--muted);
  display: block;
  font-family: var(--pixel-font);
  font-size: 8px;
  margin-bottom: 6px;
  text-align: right;
}

.dual-controls-mana .bar {
  height: 23px;
}

.dual-controls-targets {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  padding: 8px;
}

.dual-controls-targets button,
.dual-controls-targets .dual-control-chip {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  justify-content: center;
  min-height: 42px;
}

.dual-controls-targets.direct {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dual-controls-targets.direct button,
.dual-controls-targets.direct .dual-control-chip {
  font-size: 15px;
  min-height: 34px;
}

.dual-controls-spells {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 0;
  padding: 10px;
}

.dual-controls-spells .spell {
  min-height: 0;
}

.dual-controls-spells .spell-icon {
  height: 58px;
  margin-top: 21px;
  width: 58px;
}

.dual-controls-spells .spell strong {
  font-size: 18px;
}

.dual-controls-spells .spell small {
  font-size: 16px;
}

@media (max-width: 700px), (max-height: 640px) {
  .dual-bottom-display {
    gap: 6px;
    min-height: 100dvh;
    overflow: hidden;
    padding: 6px;
  }

  .dual-controls-header,
  .dual-controls-resource,
  .dual-controls-targets,
  .dual-controls-spells,
  .setup-bottom-summary,
  .setup-bottom-stats {
    border-width: 2px;
    width: 100%;
  }

  .dual-controls-header {
    min-height: 42px;
    padding: 5px 8px;
  }

  .dual-controls-header .eyebrow {
    font-size: 6px;
    margin-bottom: 3px;
  }

  .dual-controls-header h1 {
    font-size: 13px;
    line-height: 1.2;
  }

  .dual-controls-header small {
    font-size: 11px;
  }

  .dual-controls-progress {
    font-size: 6px;
  }

  .setup-bottom-summary {
    gap: 8px;
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 8px;
  }

  .setup-bottom-summary .dungeon-art {
    font-size: 13px;
    height: 54px;
    width: 54px;
  }

  .setup-bottom-summary h2 {
    font-size: 11px;
    line-height: 1.2;
  }

  .setup-bottom-summary p:not(.eyebrow),
  .setup-bottom-summary small {
    font-size: 13px;
    line-height: 1.1;
    margin-top: 4px;
  }

  .setup-bottom-stats {
    gap: 5px;
    padding: 5px;
  }

  .setup-bottom-stats > div {
    padding: 5px 4px;
  }

  .setup-bottom-stats dt {
    font-size: 10px;
  }

  .setup-bottom-stats dd {
    font-size: 7px;
  }

  .dual-controls-resource {
    gap: 8px;
    grid-template-columns: minmax(110px, 0.8fr) minmax(150px, 1.2fr);
    padding: 6px 8px;
  }

  .dual-controls-resource .eyebrow {
    font-size: 6px;
    margin-bottom: 3px;
  }

  .dual-controls-resource strong {
    font-size: 16px;
  }

  .dual-controls-mana > span {
    font-size: 6px;
  }

  .dual-controls-mana .bar {
    height: 16px;
  }

  .dual-controls-targets {
    gap: 4px;
    padding: 4px;
  }

  .dual-controls-targets.direct {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dual-controls-targets button,
  .dual-controls-targets.direct button,
  .dual-controls-targets .dual-control-chip,
  .dual-controls-targets.direct .dual-control-chip {
    font-size: 12px;
    min-height: 30px;
    padding: 4px 5px;
  }

  .dual-controls-spells {
    gap: 5px;
    padding: 5px;
  }

  .dual-controls-spells .spell {
    min-height: 0;
    padding: 5px 3px;
  }

  .dual-controls-spells .spell kbd {
    font-size: 8px;
    padding: 1px 4px;
  }

  .dual-controls-spells .spell-icon {
    font-size: 13px;
    height: 32px;
    margin-top: 16px;
    width: 32px;
  }

  .dual-controls-spells .spell strong {
    font-size: 13px;
    line-height: 1.1;
  }

  .dual-controls-spells .spell small {
    font-size: 12px;
  }

  .pvp-opponent-bottom-display {
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  }

  .dual-opponent-progress {
    border-width: 2px;
    gap: 8px;
    grid-template-columns: minmax(100px, 0.45fr) minmax(0, 1fr);
    padding: 6px 8px;
  }

  .dual-opponent-progress .eyebrow {
    font-size: 6px;
    margin-bottom: 3px;
  }

  .dual-opponent-progress strong {
    font-size: 14px;
  }

  .dual-opponent-progress .bar {
    height: 16px;
  }

  .dual-opponent-arena {
    border-width: 2px;
    padding: 5px;
  }

  .dual-opponent-arena-field {
    max-height: 112px;
    min-height: 92px;
  }

  .dual-opponent-party-grid {
    border-width: 2px;
    gap: 6px;
    padding: 6px;
  }

  .dual-opponent-party-grid.raid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dual-opponent-member {
    padding: 6px;
  }

  .dual-opponent-member .member-header strong {
    font-size: 13px;
  }

  .dual-opponent-member .member-header small {
    font-size: 11px;
  }

  .dual-opponent-member .bar {
    height: 10px;
    margin-top: 5px;
  }

  .dual-opponent-member .member-effects {
    display: none;
  }

  .dual-opponent-effects {
    border-width: 2px;
    font-size: 11px;
    padding: 6px 8px;
  }
}

.dual-bottom-waiting {
  align-items: center;
  display: flex;
  justify-content: center;
}

.dual-bottom-waiting > section {
  padding: 36px;
  text-align: center;
}

.dual-bottom-waiting p:not(.eyebrow) {
  color: var(--muted);
  font-size: 21px;
  margin-top: 14px;
}

.game-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  overflow: hidden;
  padding: 12px 0;
  position: relative;
}

.game-shell.dungeon-shell {
  padding: 0;
  width: min(1400px, calc(100% - 28px));
}

.game-shell.dungeon-shell > .app-header {
  display: none;
}

.game-shell.settings-shell {
  padding: 6px 0;
}

.game-shell.settings-shell > .app-header {
  display: none;
}

.auth-shell {
  align-items: center;
  display: flex;
  min-height: 100vh;
  padding: 28px;
}

.auth-panel {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  margin: 0 auto;
  max-width: 980px;
  width: 100%;
}

.auth-brand,
.auth-card {
  background: var(--panel);
  border: 2px solid #090a0d;
  min-width: 0;
  outline: 2px solid #41404a;
  padding: 28px;
}

.auth-brand {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 430px;
}

.auth-brand h1 {
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: clamp(25px, 4vw, 45px);
  line-height: 1.3;
  margin: 10px 0 22px;
}

.auth-brand > p:last-child {
  color: var(--muted);
  font-size: 24px;
  line-height: 1.35;
  max-width: 580px;
}

.auth-tabs {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr 1fr;
}

.auth-tabs button {
  background: #17181e;
  border: 2px solid #090a0d;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 7px;
  min-height: 48px;
  outline: 2px solid #3e3d47;
}

.auth-tabs button.selected {
  color: var(--gold);
  outline-color: var(--gold);
}

.auth-card form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.auth-card label {
  color: var(--muted);
  display: grid;
  font-family: var(--pixel-font);
  font-size: 7px;
  gap: 8px;
  text-transform: uppercase;
}

.auth-card input {
  background: #111217;
  border: 2px solid #090a0d;
  box-sizing: border-box;
  color: var(--ink);
  font-family: inherit;
  font-size: 20px;
  outline: 2px solid #3e3d47;
  padding: 11px;
  width: 100%;
}

.auth-card input:focus {
  outline-color: var(--gold);
}

.auth-message {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.25;
  margin-top: 18px;
  min-height: 40px;
}

.auth-message.error {
  color: #ff8190;
}

.offline-divider {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-family: var(--pixel-font);
  font-size: 7px;
  gap: 10px;
  margin: 20px 0;
  text-transform: uppercase;
}

.offline-divider::before,
.offline-divider::after {
  background: #3e3d47;
  content: '';
  flex: 1;
  height: 2px;
}

.offline-entry {
  background: #111217;
  border: 2px solid #090a0d;
  display: grid;
  gap: 13px;
  outline: 2px solid #3e3d47;
  padding: 16px;
}

.offline-entry h2 {
  color: var(--ink);
  font-size: 11px;
}

.offline-entry p:not(.eyebrow) {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.2;
  margin-top: 6px;
}

.offline-resume-button,
.offline-new-button {
  cursor: pointer;
  min-height: 42px;
}

.offline-resume-button {
  background: var(--gold);
  border: 2px solid #090a0d;
  color: #19150e;
  font-family: var(--pixel-font);
  font-size: 7px;
  outline: 2px solid #816630;
}

.offline-new-button {
  border: 2px solid #3e3d47;
  width: 100%;
}

.logout-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 6px;
  padding: 3px 0;
}

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

.topbar,
.enemy-card,
.party-panel,
.combat-log,
.action-panel,
.menu-screen,
.content-screen,
.message-panel {
  border: 3px solid #0c0d11;
  outline: 2px solid var(--edge);
  background: var(--panel);
  box-shadow: 7px 7px 0 #08090c;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
}

.app-header {
  min-height: 68px;
}

.brand-button {
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.brand-button .eyebrow {
  display: block;
}

.brand-button strong {
  font-family: var(--pixel-font);
  font-size: clamp(10px, 1.3vw, 14px);
}

.character-summary {
  align-items: center;
  display: flex;
  gap: 12px;
  text-align: right;
}

.character-summary span,
.character-summary small {
  font-family: var(--pixel-font);
  font-size: 7px;
}

.character-summary strong {
  color: var(--ink);
  font-size: 19px;
}

.character-summary .mode-badge {
  color: #8fc7ff;
  margin-top: 2px;
}

.character-summary .mode-offline {
  color: var(--gold);
}

.header-xp {
  background: #090a0d;
  height: 5px;
  overflow: hidden;
  width: 100px;
}

.header-xp span,
.experience-bar span {
  background: var(--purple);
  box-shadow: inset 0 3px #b08bdf;
  display: block;
  height: 100%;
  transition: transform 180ms linear;
  width: 100%;
  will-change: transform;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  color: var(--ink);
  font-family: var(--pixel-font);
  line-height: 1.45;
}

h1 {
  font-size: clamp(18px, 3vw, 28px);
}

h2 {
  font-size: 14px;
}

.eyebrow {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 8px;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.menu-screen,
.content-screen,
.message-panel {
  flex: 1;
  margin-top: 12px;
  min-height: 0;
  overflow: hidden;
  padding: 28px;
}

.content-screen {
  display: flex;
  flex-direction: column;
}

.dungeon-run-screen {
  gap: 14px;
  margin-top: 0;
}

.menu-screen {
  align-items: center;
  display: flex;
}

.content-screen > .screen-heading {
  flex: 0 0 auto;
}

.dungeon-run-board {
  display: grid;
  flex: 1;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.48fr);
  min-height: 0;
  overflow: hidden;
}

.dungeon-run-main,
.dungeon-setup-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.dungeon-run-main {
  gap: 10px;
}

.dungeon-setup-rail {
  gap: 10px;
}

.dungeon-heading-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.message-panel {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.message-panel > p:last-child {
  color: var(--muted);
  font-size: 22px;
  margin-top: 16px;
}

.menu-intro {
  border-bottom: 2px solid #34343d;
  padding: 20px 4px 28px;
  text-align: center;
}

.menu-intro > p:last-child {
  color: var(--muted);
  font-size: 23px;
  margin: 15px auto 0;
  max-width: 700px;
}

.progress-summary {
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: auto minmax(150px, 310px) auto;
  justify-content: center;
  margin-top: 20px;
}

.progress-summary > span,
.progress-summary > small {
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 7px;
}

.experience-bar {
  height: 12px;
}

.main-menu-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  height: min(100%, 388px);
  margin: 0 auto;
  max-width: 900px;
  width: 100%;
}

.main-menu-grid.has-cloud-sync {
  grid-auto-rows: minmax(72px, auto);
  grid-template-rows: none;
  height: auto;
}

.roguelike-mode-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.roguelike-variant-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.roguelike-screen {
  gap: 12px;
}

.roguelike-screen .screen-heading {
  flex: 0 0 auto;
}

.roguelike-screen > .roguelike-variant-row,
.roguelike-screen > .roguelike-option-panel,
.roguelike-screen > .pvp-queue-panel {
  flex: 0 0 auto;
  margin-bottom: 0;
  margin-top: 0;
}

.roguelike-option-panel {
  align-items: center;
  background: #111319;
  border: 2px solid #090a0d;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  outline: 2px solid #41404a;
  padding: 14px;
}

.roguelike-timing-row {
  display: flex;
  gap: 10px;
}

.roguelike-timing-row .text-button.active {
  background: var(--gold);
  color: #111216;
}

.pvp-queue-panel {
  justify-content: space-between;
  margin-top: 16px;
}

.pvp-queue-panel .text-button {
  white-space: nowrap;
}

.roguelike-screen .pvp-queue-panel {
  min-height: 104px;
}

.roguelike-screen .text-button {
  min-height: 38px;
}

.menu-card {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 12px;
  min-height: 0;
  outline: 2px solid #42414c;
  padding: 12px;
  text-align: left;
}

.menu-card:hover {
  outline-color: var(--gold);
  transform: translateY(-2px);
}

.menu-card.game-selected {
  outline: 3px solid #fff4a8;
  box-shadow: 0 0 0 5px #8b6726, 0 0 18px rgba(229, 185, 95, 0.65);
}

.menu-card.game-selected > span {
  background: var(--gold);
  color: #13141a;
}

.cloud-sync-card {
  align-items: start;
  cursor: default;
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr) minmax(180px, 220px);
  justify-content: space-between;
}

.cloud-sync-card:hover {
  outline-color: #42414c;
  transform: none;
}

.cloud-sync-card > div {
  display: grid;
  flex: 1;
  gap: 6px;
  min-width: 0;
}

.cloud-sync-control-stack {
  display: grid;
  gap: 8px;
  grid-column: 3;
}

.cloud-sync-control-stack .text-button {
  grid-column: auto;
  min-height: 28px;
  padding: 5px 8px;
}

.cloud-sync-card .text-button:disabled {
  opacity: 0.7;
}

.cloud-sync-times {
  display: grid;
  gap: 3px;
}

.cloud-sync-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
}

.cloud-sync-actions .text-button {
  grid-column: auto;
  min-width: 0;
  white-space: normal;
}

@media (max-width: 720px) {
  .cloud-sync-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .cloud-sync-card .text-button,
  .cloud-sync-control-stack {
    grid-column: 1 / -1;
  }
}

.cloud-sync-message {
  color: var(--gold);
}

.menu-card > span,
.class-portrait {
  align-items: center;
  background: #13141a;
  border: 2px solid var(--gold);
  color: var(--gold);
  display: flex;
  flex: 0 0 48px;
  font-family: var(--pixel-font);
  font-size: 16px;
  height: 48px;
  justify-content: center;
}

.menu-card strong,
.menu-card small {
  display: block;
}

.menu-card strong {
  font-family: var(--pixel-font);
  font-size: 10px;
  margin-bottom: 5px;
}

.menu-card small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.05;
}

.screen-heading {
  align-items: center;
  border-bottom: 2px solid #34343d;
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
}

.back-button,
.text-button {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--muted);
  cursor: pointer;
  outline: 2px solid #464550;
  padding: 9px 13px;
}

.back-button:hover,
.text-button:hover {
  color: var(--ink);
  outline-color: var(--gold);
}

.settings-nav {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
  margin-top: 0;
}

.settings-tabs,
.talent-page-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.settings-tabs {
  margin-top: 0;
}

.settings-tabs button,
.talent-page-tabs button {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 8px;
  min-height: 42px;
  outline: 2px solid #41404a;
  padding: 8px 10px;
  text-transform: uppercase;
}

.settings-tabs button.selected,
.settings-tabs button:hover,
.talent-page-tabs button.active,
.talent-page-tabs button:hover {
  color: var(--gold);
  outline-color: var(--gold);
}

.settings-back-button.game-selected,
.settings-tabs button.game-selected,
.dual-screen-actions button.game-selected,
.controller-preferences button.game-selected,
.binding-tabs button.game-selected,
.binding-list button.game-selected,
.settings-footer .text-button.game-selected,
.binding-capture button.game-selected {
  color: var(--ink);
}

.settings-screen,
.equipment-screen,
.talent-screen,
.customize-screen {
  height: calc(100dvh - 92px);
}

.settings-shell .settings-screen {
  height: calc(100dvh - 12px);
  margin-top: 0;
}

.settings-tab-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.settings-bindings-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.settings-bindings-panel .settings-heading,
.settings-bindings-panel .binding-tabs,
.settings-bindings-panel .settings-footer {
  flex: 0 0 auto;
}

.settings-bindings-panel .binding-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.equipment-screen .gear-summary,
.equipment-screen .equipment-tabs,
.equipment-screen .item-comparison,
.equipment-screen .equipment-footer,
.talent-screen .talent-toolbar,
.talent-screen .talent-page-tabs,
.talent-screen .talent-footer {
  flex: 0 0 auto;
}

.equipment-screen .equipment-layout,
.equipment-screen .crafting-panel,
.talent-screen .talent-tree,
.talent-screen .spell-effect-layout {
  flex: 0 0 auto;
  min-height: 0;
}

.talent-screen .talent-tree {
  display: grid;
  gap: 12px;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

.embedded-screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.customize-screen > .customize-tabs {
  flex: 0 0 auto;
}

.customize-screen > .customize-layout,
.customize-screen > .embedded-screen {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.customize-screen .loadout-editor {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.customize-screen .ability-library {
  flex: 1;
  min-height: 0;
}

.customize-screen .class-picker {
  min-height: 0;
  overflow: hidden;
}

.loot-preview-grid,
.leaderboard-table {
  max-height: 360px;
  overflow-y: auto;
}

.combat-header-actions {
  align-items: center;
  display: flex;
  gap: 16px;
}

.dungeon-card {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  display: grid;
  gap: 20px;
  grid-template-columns: 112px 1fr minmax(180px, 240px) auto;
  margin-top: 16px;
  outline: 2px solid #494754;
  padding: 19px;
}

.dungeon-art {
  align-items: center;
  background: linear-gradient(#632831, #24151c);
  border: 3px solid #0a0b0e;
  color: #ef7b66;
  display: flex;
  font-family: var(--pixel-font);
  font-size: 20px;
  height: 92px;
  justify-content: center;
  outline: 2px solid #8d3e45;
}

.dungeon-art.raid-art {
  background: linear-gradient(#713b16, #2d160d);
  color: #ffc15b;
  outline-color: #a85d20;
}

.run-setup-panel,
.run-summary-card {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  margin-top: 14px;
  outline: 2px solid #3e3d47;
  padding: 16px;
}

.run-setup-heading {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.run-setup-heading h2,
.run-summary-copy h2 {
  font-size: 14px;
}

.run-title-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.run-title-row h2 {
  min-width: 0;
}

.inline-back-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 10px;
}

.run-setup-heading small {
  color: var(--muted);
  font-size: 16px;
  text-align: right;
}

.activity-pager {
  align-items: center;
  display: flex;
  gap: 8px;
}

.activity-pager button {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  min-height: 34px;
  outline: 2px solid #41404a;
  padding: 6px 8px;
}

.activity-pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.activity-pager span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.tier-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  margin-top: 14px;
}

.tier-grid button,
.activity-card {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  outline: 2px solid #41404a;
}

.tier-grid button {
  display: grid;
  gap: 7px;
  min-height: 70px;
  padding: 11px;
  text-align: left;
}

.tier-grid button:hover:not(:disabled),
.tier-grid button.selected,
.activity-card:hover:not(:disabled),
.activity-card.selected {
  outline-color: var(--gold);
}

.tier-grid button.selected,
.activity-card.selected {
  background: #29291f;
  box-shadow: inset 0 0 0 2px #6e5727;
}

.tier-grid strong,
.tier-grid span,
.activity-card strong,
.activity-card small,
.activity-card i {
  display: block;
}

.tier-grid strong,
.activity-card strong {
  font-family: var(--pixel-font);
  font-size: 8px;
}

.tier-grid span,
.activity-card small,
.activity-card i {
  color: var(--muted);
  font-size: 15px;
  font-style: normal;
}

.tier-grid button.locked,
.activity-card.locked {
  cursor: not-allowed;
  filter: grayscale(0.75);
  opacity: 0.55;
}

.activity-card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  margin-top: 14px;
}

.activity-card {
  align-items: center;
  display: grid;
  gap: 8px 12px;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 112px;
  padding: 12px;
  text-align: left;
}

.activity-card .dungeon-art {
  grid-row: span 3;
  height: 68px;
  width: 68px;
}

.run-summary-card {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 92px minmax(0, 1fr) minmax(190px, 260px);
}

.dungeon-focus-card {
  flex: 0 0 auto;
  grid-template-columns: 108px minmax(0, 1fr);
  margin-top: 0;
  min-height: 178px;
}

.dungeon-focus-card > .dungeon-art {
  height: 108px;
}

.run-summary-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  margin-top: 6px;
}

.part-picker {
  display: grid;
  gap: 8px;
}

.part-setup-panel .part-picker {
  grid-template-columns: 1fr;
}

.part-setup-panel .primary-button {
  min-height: 54px;
}

.dungeon-choice-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 0;
  min-height: 0;
}

.dungeon-choice-grid {
  align-content: start;
  flex: 1;
  grid-auto-rows: minmax(86px, max-content);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
  overflow: hidden;
}

.dungeon-choice-grid .activity-card {
  min-height: 86px;
}

.tier-setup-panel,
.part-setup-panel,
.dungeon-setup-rail .difficulty-section,
.dungeon-setup-rail .loot-preview-section,
.dungeon-setup-rail .leaderboard-section {
  margin-top: 0;
}

.tier-setup-panel {
  flex: 0 0 auto;
}

.tier-setup-panel .tier-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tier-setup-panel .tier-grid button {
  min-height: 56px;
  padding: 9px;
}

.dungeon-setup-rail .run-setup-heading {
  gap: 10px;
}

.dungeon-setup-rail .run-setup-heading small {
  font-size: 14px;
  line-height: 1.05;
}

.dungeon-setup-rail .difficulty-summary {
  grid-template-columns: 1fr;
}

.dungeon-setup-rail .difficulty-summary small {
  line-height: 1.05;
}

.dungeon-setup-rail .difficulty-summary dl {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dungeon-setup-rail .loot-preview-section {
  min-height: 0;
}

.dungeon-setup-rail .loot-preview-grid {
  grid-template-columns: 1fr;
  max-height: 260px;
  overflow-y: auto;
}

@media (max-height: 1100px) {
  .game-shell.dungeon-shell {
    padding: 0;
  }

  .dungeon-shell .app-header {
    display: none;
  }

  .dungeon-run-screen {
    gap: 8px;
    margin-top: 0;
    padding: 10px;
  }

  .dungeon-run-board,
  .dungeon-run-main {
    gap: 10px;
  }

  .dungeon-setup-rail {
    gap: 8px;
  }

  .dungeon-run-screen .run-setup-panel,
  .dungeon-run-screen .run-summary-card,
  .dungeon-run-screen .difficulty-section,
  .dungeon-run-screen .loot-preview-section,
  .dungeon-run-screen .leaderboard-section {
    padding: 10px;
  }

  .dungeon-focus-card {
    grid-template-columns: 64px minmax(0, 1fr);
    min-height: 92px;
  }

  .dungeon-focus-card > .dungeon-art {
    height: 64px;
  }

  .dungeon-focus-card .run-summary-copy p:not(.eyebrow) {
    font-size: 14px;
    line-height: 1.05;
  }

  .dungeon-run-screen .run-setup-heading h2,
  .dungeon-focus-card .run-summary-copy h2 {
    font-size: 12px;
  }

  .inline-back-button {
    font-size: 12px;
    min-height: 28px;
    padding: 4px 7px;
  }

  .activity-pager button {
    font-size: 9px;
    min-height: 28px;
    padding: 4px 6px;
  }

  .activity-pager span {
    font-size: 11px;
  }

  .dungeon-run-screen .eyebrow {
    font-size: 7px;
    margin-bottom: 5px;
  }

  .dungeon-choice-grid,
  .dungeon-run-screen .tier-grid {
    gap: 8px;
    margin-top: 9px;
  }

  .dungeon-choice-grid .activity-card {
    gap: 5px 9px;
    grid-template-columns: 46px minmax(0, 1fr);
    min-height: 66px;
    padding: 6px;
  }

  .dungeon-choice-grid .activity-card .dungeon-art {
    height: 42px;
    width: 42px;
  }

  .dungeon-choice-grid .activity-card strong,
  .dungeon-run-screen .tier-grid strong {
    font-size: 7px;
  }

  .dungeon-choice-grid .activity-card small,
  .dungeon-choice-grid .activity-card i,
  .dungeon-run-screen .tier-grid span {
    font-size: 13px;
    line-height: 1;
  }

  .tier-setup-panel .tier-grid button {
    min-height: 40px;
    padding: 5px 7px;
  }

  .part-setup-panel .part-picker {
    gap: 6px;
  }

  .part-setup-panel .primary-button {
    font-size: 8px;
    min-height: 38px;
    padding: 5px 8px;
  }

  .dungeon-setup-rail .difficulty-summary {
    gap: 8px;
    padding: 8px;
  }

  .dungeon-setup-rail .difficulty-summary small {
    font-size: 13px;
  }

  .dungeon-setup-rail .difficulty-summary dl {
    gap: 6px;
  }

  .dungeon-setup-rail .difficulty-summary dl > div {
    padding: 5px 6px;
  }

  .dungeon-setup-rail .difficulty-summary dt,
  .dungeon-setup-rail .difficulty-summary dd {
    font-size: 12px;
  }

  .dungeon-setup-rail .equipment-heading h2 {
    font-size: 11px;
  }

  .dungeon-setup-rail .loot-preview-grid {
    max-height: 160px;
  }
}

@media (max-height: 760px) {
  .dungeon-run-screen .screen-heading {
    align-items: center;
    padding-bottom: 6px;
  }

  .dungeon-run-screen .screen-heading .eyebrow,
  .dungeon-focus-card .run-summary-copy > p:not(.eyebrow),
  .dungeon-setup-rail .run-setup-heading small {
    display: none;
  }

  .dungeon-focus-card {
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: 68px;
  }

  .dungeon-focus-card > .dungeon-art {
    height: 52px;
  }

  .dungeon-run-screen .run-setup-panel,
  .dungeon-run-screen .run-summary-card,
  .dungeon-run-screen .difficulty-section,
  .dungeon-run-screen .loot-preview-section,
  .dungeon-run-screen .leaderboard-section {
    padding: 7px;
  }

  .dungeon-setup-rail .difficulty-summary small,
  .dungeon-run-screen .tag-row {
    display: none;
  }
}

@media (max-width: 900px) {
  .dungeon-run-board {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .dungeon-run-main,
  .dungeon-setup-rail {
    overflow: visible;
  }
}

@media (max-height: 620px) {
  .game-shell.dungeon-shell {
    width: 100%;
  }

  .dungeon-run-screen {
    gap: 5px;
    padding: 6px;
  }

  .dungeon-run-board,
  .dungeon-run-main,
  .dungeon-setup-rail {
    gap: 5px;
  }

  .dungeon-run-board {
    grid-template-columns: minmax(0, 1fr) 292px;
  }

  .dungeon-run-screen .run-setup-panel,
  .dungeon-run-screen .run-summary-card,
  .dungeon-run-screen .difficulty-section,
  .dungeon-run-screen .loot-preview-section,
  .dungeon-run-screen .leaderboard-section {
    padding: 5px;
  }

  .dungeon-focus-card {
    gap: 7px;
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 52px;
  }

  .dungeon-focus-card > .dungeon-art {
    font-size: 11px;
    height: 42px;
  }

  .dungeon-run-screen .run-setup-heading h2,
  .dungeon-focus-card .run-summary-copy h2,
  .dungeon-setup-rail .equipment-heading h2 {
    font-size: 9px;
    line-height: 1.2;
  }

  .inline-back-button {
    font-size: 10px;
    min-height: 24px;
    padding: 3px 6px;
  }

  .dungeon-run-screen .eyebrow,
  .dungeon-run-screen .tier-grid strong,
  .dungeon-choice-grid .activity-card strong,
  .dungeon-setup-rail .difficulty-summary strong {
    font-size: 6px;
    line-height: 1.2;
    margin-bottom: 2px;
  }

  .dungeon-choice-grid,
  .dungeon-run-screen .tier-grid {
    gap: 5px;
    margin-top: 5px;
  }

  .activity-pager {
    gap: 4px;
  }

  .activity-pager button {
    font-size: 8px;
    min-height: 24px;
    padding: 3px 5px;
  }

  .activity-pager span {
    font-size: 9px;
  }

  .dungeon-choice-grid {
    grid-auto-rows: minmax(72px, max-content);
  }

  .dungeon-choice-grid .activity-card {
    gap: 5px 7px;
    grid-template-columns: 40px minmax(0, 1fr);
    min-height: 72px;
    padding: 6px;
  }

  .dungeon-choice-grid .activity-card .dungeon-art {
    font-size: 10px;
    height: 38px;
    width: 38px;
  }

  .dungeon-choice-grid .activity-card small,
  .dungeon-choice-grid .activity-card i,
  .dungeon-run-screen .tier-grid span {
    font-size: 11px;
    line-height: 1;
  }

  .tier-setup-panel .tier-grid button {
    min-height: 34px;
    padding: 4px 5px;
  }

  .part-setup-panel .part-picker {
    gap: 4px;
  }

  .part-setup-panel .primary-button {
    font-size: 7px;
    min-height: 36px;
    padding: 4px 5px;
  }

  .dungeon-setup-rail .difficulty-summary {
    gap: 5px;
    padding: 5px;
  }

  .dungeon-setup-rail .difficulty-summary dl {
    gap: 4px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dungeon-setup-rail .difficulty-summary dl > div {
    padding: 3px 4px;
  }

  .dungeon-setup-rail .difficulty-summary dt,
  .dungeon-setup-rail .difficulty-summary dd {
    font-size: 10px;
  }

  .dungeon-setup-rail .loot-preview-section .equipment-heading {
    gap: 6px;
  }

  .dungeon-setup-rail .loot-preview-section .eyebrow {
    display: none;
  }

  .dungeon-setup-rail .loot-preview-section .text-button {
    font-size: 12px;
    padding: 5px 7px;
  }

  .dungeon-heading-actions {
    gap: 6px;
  }

  .roguelike-screen {
    gap: 7px;
    padding: 8px;
  }

  .roguelike-screen .screen-heading {
    padding-bottom: 6px;
  }

  .roguelike-screen .roguelike-option-panel {
    padding: 8px;
  }

  .roguelike-screen .pvp-queue-panel {
    min-height: 76px;
  }

  .roguelike-screen .menu-card > span {
    flex-basis: 38px;
    height: 38px;
  }

  .roguelike-screen .menu-card small {
    font-size: 13px;
  }

  .roguelike-screen .text-button {
    min-height: 30px;
    padding: 5px 8px;
  }
}

@media (max-width: 700px) and (max-height: 620px) {
  .dungeon-run-board {
    grid-template-columns: minmax(0, 1fr) 292px;
    overflow: hidden;
  }

  .dungeon-run-main,
  .dungeon-setup-rail {
    overflow: hidden;
  }

  .dungeon-focus-card {
    display: none;
  }

  .dungeon-choice-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 620px) {
  .game-shell.workshop-shell {
    height: 100dvh;
    padding: 0;
    width: 100%;
  }

  .game-shell.workshop-shell > .app-header {
    display: none;
  }

  .workshop-shell .customize-screen {
    height: 100dvh;
    margin-top: 0;
    padding: 6px;
  }

  .workshop-shell .screen-heading {
    padding-bottom: 4px;
  }

  .workshop-shell .screen-heading .eyebrow {
    display: none;
  }

  .workshop-shell .screen-heading h1 {
    font-size: 13px;
    line-height: 1.15;
  }

  .workshop-shell .back-button {
    font-size: 14px;
    min-height: 32px;
    padding: 5px 8px;
  }

  .customize-tabs {
    gap: 5px;
    margin-top: 5px;
  }

  .customize-tabs button,
  .equipment-tab,
  .talent-page-tabs button {
    font-size: 7px;
    min-height: 30px;
    padding: 5px 7px;
  }

  .equipment-screen,
  .talent-screen {
    gap: 0;
    height: auto;
  }

  .embedded-screen .gear-summary,
  .embedded-screen .talent-toolbar,
  .equipment-screen.crafting-active .gear-summary {
    margin-top: 5px;
    padding: 5px 7px;
  }

  .gear-summary {
    gap: 6px;
    grid-template-columns: minmax(130px, 1.3fr) repeat(3, minmax(62px, 0.7fr));
  }

  .gear-character {
    gap: 7px;
  }

  .gear-character > span,
  .equipment-screen.crafting-active .gear-character > span,
  .talent-class-summary > span {
    flex-basis: 30px;
    height: 30px;
  }

  .gear-character h2,
  .talent-class-summary h2,
  .equipment-heading h2 {
    font-size: 9px;
    line-height: 1.2;
  }

  .gear-stat {
    padding-left: 6px;
  }

  .gear-stat strong,
  .talent-points strong,
  .equipment-screen.crafting-active .gear-stat strong {
    font-size: 11px;
  }

  .gear-stat span,
  .equipment-screen.crafting-active .gear-stat span {
    font-size: 10px;
    margin-top: 1px;
  }

  .equipment-tabs,
  .equipment-screen.crafting-active .equipment-tabs,
  .talent-page-tabs {
    gap: 5px;
    margin-top: 5px;
  }

  .item-comparison {
    gap: 5px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) minmax(92px, 0.45fr);
    margin-top: 5px;
    min-height: 80px;
    padding: 5px;
  }

  .comparison-arrow {
    font-size: 12px;
    padding: 0;
  }

  .item-detail {
    padding: 5px;
  }

  .item-title {
    gap: 5px;
  }

  .item-title > span {
    flex-basis: 28px;
    height: 28px;
  }

  .item-detail h2 {
    font-size: 9px;
    line-height: 1.2;
  }

  .item-detail small,
  .item-detail > p:not(.eyebrow),
  .item-detail li,
  .comparison-delta span {
    font-size: 10px;
    line-height: 1.05;
  }

  .item-detail > p:not(.eyebrow) {
    max-height: 22px;
    overflow: hidden;
  }

  .item-detail ul {
    margin-top: 4px;
  }

  .equip-action {
    gap: 5px;
  }

  .equip-action .primary-button,
  .equip-action .breakdown-button,
  .equipment-footer .text-button {
    font-size: 7px;
    min-height: 28px;
    padding: 4px 6px;
  }

  .equipment-layout {
    gap: 6px;
    grid-template-columns: minmax(0, 1.08fr) minmax(180px, 0.92fr);
    margin-top: 6px;
  }

  .equipped-panel,
  .inventory-panel,
  .crafting-panel,
  .set-bonus-panel,
  .crafting-filters,
  .crafting-list-panel,
  .crafting-detail-panel {
    padding: 5px;
  }

  .equipment-slots,
  .inventory-list,
  .crafting-list {
    gap: 4px;
    margin-top: 5px;
  }

  .equipment-slots > button,
  .inventory-list > button,
  .crafting-list > button {
    gap: 5px;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    min-height: 36px;
    padding: 4px 5px;
  }

  .equipment-slots > button > span,
  .inventory-list > button > span,
  .crafting-list > button > span {
    height: 26px;
  }

  .equipment-slots > button strong,
  .inventory-list strong,
  .crafting-list strong {
    font-size: 10px;
    line-height: 1.15;
  }

  .equipment-slots > button small,
  .inventory-list small,
  .crafting-list small,
  .inventory-list i,
  .crafting-list i,
  .equipment-slots .item-status i {
    font-size: 10px;
    line-height: 1;
  }

  .list-pager {
    gap: 5px;
    margin-top: 3px;
  }

  .list-pager button {
    font-size: 7px;
    min-height: 26px;
    padding: 4px 6px;
  }

  .equipment-footer {
    font-size: 11px;
    min-height: 20px;
    padding-top: 5px;
  }

  .equipment-screen.crafting-active .gear-summary {
    display: none;
  }

  .equipment-screen.crafting-active .crafting-panel {
    margin-top: 5px;
  }

  .crafting-layout {
    gap: 6px;
    grid-template-columns: minmax(160px, 1fr) minmax(0, 2fr);
    margin-top: 6px;
  }

  .crafting-available-panel {
    gap: 6px;
    grid-template-columns: minmax(0, 1.25fr) minmax(170px, 0.75fr);
  }

  .crafting-filters {
    gap: 7px;
  }

  .crafting-filter-grid,
  .crafting-level-row {
    gap: 4px;
  }

  .crafting-filter-grid button {
    min-height: 30px;
    padding: 4px;
  }

  .crafting-filter-grid strong {
    font-size: 5px;
  }

  .crafting-filter-grid span {
    font-size: 10px;
  }

  .crafting-level-row button {
    font-size: 6px;
    min-height: 25px;
    min-width: 32px;
    padding: 3px 5px;
  }

  .crafting-detail {
    gap: 5px;
  }

  .crafting-detail-heading span {
    font-size: 6px;
  }

  .crafting-components {
    gap: 4px;
  }

  .crafting-components > div {
    gap: 5px;
    grid-template-columns: 20px 1fr auto;
    min-height: 26px;
    padding: 4px;
  }

  .crafting-components strong,
  .crafting-components i {
    font-size: 10px;
  }

  .talent-toolbar {
    margin-top: 5px;
  }

  .talent-class-summary {
    gap: 7px;
  }

  .talent-points span,
  .talent-points small {
    font-size: 9px;
    margin-top: 1px;
  }

  .talent-tree {
    gap: 5px;
    margin-top: 5px;
  }

  .talent-tier {
    gap: 6px;
    grid-template-columns: 70px minmax(0, 1fr);
    padding: 5px 0;
  }

  .tier-label {
    padding-right: 6px;
  }

  .tier-label span {
    font-size: 6px;
  }

  .tier-label small {
    font-size: 10px;
    margin-top: 4px;
  }

  .tier-talents {
    gap: 5px;
  }

  .talent-node {
    min-height: 0;
    padding: 5px;
  }

  .talent-node-header {
    gap: 5px;
  }

  .talent-node-header > span {
    flex-basis: 26px;
    height: 26px;
  }

  .talent-node-header strong {
    font-size: 6px;
    line-height: 1.2;
  }

  .talent-node-header small,
  .talent-node > p,
  .talent-node > button:disabled {
    font-size: 10px;
    line-height: 1;
  }

  .talent-node > p {
    max-height: 30px;
    margin-top: 4px;
    overflow: hidden;
  }

  .rank-pips {
    gap: 2px;
    margin: 4px 0;
  }

  .rank-pips i {
    height: 4px;
    width: 12px;
  }

  .talent-node > button {
    font-size: 7px;
    min-height: 24px;
    padding: 3px;
  }

  .talent-footer {
    font-size: 11px;
    padding-top: 5px;
  }
}

@media (max-width: 700px) and (max-height: 620px) {
  .gear-summary {
    grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(52px, auto));
  }

  .gear-character .eyebrow,
  .talent-class-summary .eyebrow {
    display: none;
  }

  .item-comparison {
    grid-template-columns: minmax(0, 1fr) minmax(92px, 0.45fr);
  }

  .item-comparison .comparison-arrow,
  .item-comparison .empty-comparison,
  .item-comparison article:nth-of-type(2) {
    display: none;
  }

  .equipment-layout {
    grid-template-columns: minmax(0, 1fr) minmax(168px, 0.82fr);
  }

  .crafting-layout {
    grid-template-columns: 112px minmax(0, 1fr) 174px;
  }

  .crafting-filter-grid {
    grid-template-columns: 1fr;
  }

  .crafting-filter-grid button {
    min-height: 24px;
  }

  .crafting-list > button {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .crafting-list > button i {
    display: none;
  }

  .talent-toolbar .talent-class-summary h2 {
    display: none;
  }

  .talent-tier {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .tier-talents {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.part-picker .primary-button.selected-part {
  background: #f0cb79;
  outline-color: #fff;
}

.part-picker .primary-button.locked {
  cursor: not-allowed;
  filter: grayscale(0.65);
  opacity: 0.62;
}

.dungeon-card h2 {
  font-size: 16px;
}

.dungeon-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  margin-top: 6px;
}

.activity-select,
.loot-toolbar label {
  display: grid;
  gap: 8px;
}

.activity-select > span,
.loot-toolbar span {
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 7px;
  text-transform: uppercase;
}

.activity-select select,
.loot-toolbar select {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 8px;
  min-height: 42px;
  outline: 2px solid #41404a;
  padding: 0 12px;
  width: 100%;
}

.difficulty-section {
  background: #1c1e25;
  border: 2px solid #0a0b0e;
  margin-top: 14px;
  outline: 2px solid #3e3d47;
  padding: 16px;
}

.compact-difficulty-section {
  display: grid;
  gap: 12px;
}

.difficulty-select-row {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.difficulty-select-row label {
  align-items: center;
  display: flex;
  gap: 9px;
}

.difficulty-select-row label > span {
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 7px;
  text-transform: uppercase;
}

.difficulty-select-row select {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 8px;
  min-height: 42px;
  outline: 2px solid #41404a;
  padding: 0 12px;
}

.difficulty-summary {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
  outline: 2px solid #41404a;
  padding: 11px 13px;
}

.difficulty-summary.locked {
  opacity: 0.62;
}

.difficulty-summary strong,
.difficulty-summary small {
  display: block;
}

.difficulty-summary strong {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 9px;
}

.difficulty-summary small {
  color: var(--muted);
  font-size: 15px;
  margin-top: 4px;
}

.difficulty-summary dl {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.difficulty-summary dl > div {
  background: #15161c;
  padding: 7px 8px;
}

.difficulty-summary dt,
.difficulty-summary dd {
  margin: 0;
}

.difficulty-summary dt {
  color: var(--muted);
  font-size: 13px;
}

.difficulty-summary dd {
  color: var(--gold);
  font-size: 14px;
}

.difficulty-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 14px;
}

.difficulty-grid > button {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  min-height: 230px;
  outline: 2px solid #41404a;
  padding: 11px;
  text-align: left;
}

.difficulty-grid > button:hover,
.difficulty-grid > button.selected {
  outline-color: var(--gold);
  transform: translateY(-2px);
}

.difficulty-grid > button.locked {
  filter: grayscale(0.65);
  opacity: 0.62;
}

.difficulty-grid > button.selected.locked {
  outline-color: #8f6368;
}

.difficulty-title {
  align-items: center;
  display: flex;
  gap: 8px;
}

.difficulty-title > span {
  align-items: center;
  background: #15161c;
  color: var(--gold);
  display: flex;
  flex: 0 0 32px;
  font-family: var(--pixel-font);
  font-size: 8px;
  height: 32px;
  justify-content: center;
}

.difficulty-title strong,
.difficulty-title small {
  display: block;
}

.difficulty-title strong {
  font-family: var(--pixel-font);
  font-size: 7px;
}

.difficulty-title small {
  color: var(--muted);
  font-size: 14px;
  margin-top: 3px;
}

.difficulty-grid > button > p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  min-height: 50px;
  margin-top: 12px;
}

.difficulty-grid dl {
  margin: 10px 0 0;
}

.difficulty-grid dl > div {
  border-top: 1px solid #3c3c46;
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.difficulty-grid dt {
  color: var(--muted);
  font-size: 14px;
}

.difficulty-grid dd {
  color: var(--gold);
  font-size: 14px;
  margin: 0;
}

.loot-preview-section {
  background: #1c1e25;
  border: 2px solid #0a0b0e;
  margin-top: 14px;
  outline: 2px solid #3e3d47;
  padding: 16px;
}

.toggle-heading {
  gap: 18px;
}

.section-note {
  color: var(--muted);
  font-size: 16px;
  margin-top: 10px;
}

.loot-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.loot-preview-grid {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.loot-preview-grid > article {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  outline: 2px solid #41404a;
  padding: 11px;
}

.loot-encounter-title {
  align-items: center;
  border-bottom: 1px solid #3b3b45;
  display: flex;
  gap: 9px;
  padding-bottom: 9px;
}

.loot-encounter-title > span {
  align-items: center;
  background: #15161c;
  color: var(--gold);
  display: flex;
  flex: 0 0 31px;
  font-family: var(--pixel-font);
  font-size: 8px;
  height: 31px;
  justify-content: center;
}

.loot-boss-icon {
  background: #15161c;
  border: 2px solid #090a0d;
  display: block;
  flex: 0 0 35px;
  height: 35px;
  object-fit: cover;
  outline: 1px solid #41404a;
  width: 35px;
}

.loot-encounter-title strong,
.loot-encounter-title small {
  display: block;
}

.loot-encounter-title strong {
  font-family: var(--pixel-font);
  font-size: 7px;
  line-height: 1.4;
}

.loot-encounter-title small {
  color: var(--muted);
  margin-top: 3px;
}

.loot-items {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.loot-items > div {
  align-items: center;
  background: #1a1b21;
  border-left: 3px solid var(--rarity-color, #a8a3ad);
  display: grid;
  gap: 7px;
  grid-template-columns: 29px 1fr auto;
  min-height: 51px;
  padding: 6px;
}

.loot-items > div > span {
  align-items: center;
  color: var(--rarity-color, var(--ink));
  display: flex;
  font-family: var(--pixel-font);
  justify-content: center;
}

.loot-items strong,
.loot-items small {
  display: block;
}

.loot-items strong {
  color: var(--rarity-color, var(--ink));
  font-size: 14px;
}

.loot-items small,
.loot-items i {
  color: var(--muted);
  font-size: 13px;
}

.loot-items i {
  font-style: normal;
}

.leaderboard-section {
  background: #1c1e25;
  border: 2px solid #0a0b0e;
  margin-top: 14px;
  outline: 2px solid #3e3d47;
  padding: 16px;
}

.leaderboard-table {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  margin-top: 14px;
  outline: 2px solid #41404a;
}

.leaderboard-header,
.leaderboard-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 55px minmax(110px, 1.2fr) minmax(110px, 1fr) 60px 85px 80px 60px;
  padding: 9px 12px;
}

.leaderboard-header {
  background: #15161c;
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 7px;
}

.leaderboard-row {
  border-top: 1px solid #3a3a44;
  color: var(--ink);
  font-size: 16px;
}

.leaderboard-row:nth-child(2) {
  background: #30291a;
}

.leaderboard-row > strong {
  color: var(--gold);
}

.leaderboard-empty {
  color: var(--muted);
  padding: 22px;
  text-align: center;
}

.leaderboard-tabs {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.leaderboard-tab {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 6px;
  outline: 2px solid #3e3d47;
  padding: 8px 12px;
  text-transform: uppercase;
}

.leaderboard-tab.active {
  color: var(--gold);
  outline-color: var(--gold);
}

.leaderboard-tab:hover {
  color: var(--ink);
}

.tag-row {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.tag-row span {
  background: #15161c;
  color: var(--gold);
  font-size: 15px;
  padding: 3px 7px;
}

.part-buttons {
  display: flex;
  gap: 8px;
}

.part-buttons .primary-button {
  white-space: nowrap;
}

.part-buttons .primary-button.selected-part {
  outline-color: #fff;
  background: #f0cb79;
}

.part-buttons .primary-button.locked {
  filter: grayscale(0.65);
  opacity: 0.62;
  cursor: not-allowed;
}

.primary-button {
  background: var(--gold);
  border: 2px solid #08090c;
  color: #19150e;
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 8px;
  outline: 2px solid #816630;
  padding: 13px 17px;
}

.primary-button:hover:not(:disabled) {
  background: #f0cb79;
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.placeholder-panel {
  align-items: center;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  justify-content: center;
  text-align: center;
}

.placeholder-panel > p {
  color: var(--muted);
  font-size: 24px;
  max-width: 620px;
}

.placeholder-runes {
  color: #4a4855;
  font-family: var(--pixel-font);
  font-size: 39px;
  margin-bottom: 25px;
  word-spacing: 20px;
}

.talent-preview {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  display: flex;
  gap: 19px;
  max-width: 660px;
  outline: 2px solid #494754;
  padding: 22px;
  text-align: left;
}

.talent-preview > span {
  align-items: center;
  background: #4a3720;
  color: var(--gold);
  display: flex;
  flex: 0 0 64px;
  font-family: var(--pixel-font);
  height: 64px;
  justify-content: center;
}

.talent-preview strong {
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 10px;
}

.talent-preview p {
  color: var(--muted);
  font-size: 20px;
  margin-top: 8px;
}

.talent-screen {
  padding-bottom: 20px;
}

.talent-toolbar {
  align-items: center;
  background: #20222a;
  border: 2px solid #0a0b0e;
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  outline: 2px solid #42414c;
  padding: 14px 17px;
}

.talent-class-summary {
  align-items: center;
  display: flex;
  gap: 13px;
}

.talent-class-summary > span {
  align-items: center;
  background: #121319;
  border: 2px solid;
  display: flex;
  flex: 0 0 48px;
  font-family: var(--pixel-font);
  height: 48px;
  justify-content: center;
}

.talent-points {
  display: grid;
  text-align: right;
}

.talent-points strong {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 22px;
}

.talent-points span {
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 7px;
  margin-top: 4px;
}

.talent-points small {
  color: var(--muted);
  margin-top: 3px;
}

.talent-tree {
  margin-top: 17px;
}

.talent-empty-state {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  margin-top: 17px;
  outline: 2px solid #41404a;
  padding: 18px;
}

.spell-effect-layout {
  display: grid;
  flex: 0 0 auto;
  gap: 14px;
  grid-template-columns: 220px minmax(0, 1fr);
  margin-top: 17px;
  min-height: 0;
}

.effect-slots-panel,
.effect-pool-panel {
  background: #191b25;
  border: 2px solid #090a0d;
  display: flex;
  flex-direction: column;
  min-height: 0;
  outline: 2px solid #3a3944;
  padding: 12px;
}

.effect-slots-panel {
  align-content: start;
  display: grid;
  gap: 10px;
  grid-auto-rows: minmax(76px, auto);
}

.effect-slot {
  background: #20222d;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  outline: 2px solid #3a3944;
  padding: 10px;
  text-align: left;
}

.effect-slot.filled {
  background: #29291f;
  outline-color: var(--gold);
}

.effect-slot.locked {
  opacity: 0.58;
}

.effect-slot span,
.effect-pool > button i {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 8px;
  text-transform: uppercase;
}

.effect-slot strong,
.effect-slot small {
  display: block;
}

.effect-slot strong {
  font-family: var(--pixel-font);
  font-size: 8px;
  line-height: 1.35;
  margin-top: 8px;
}

.effect-slot small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  margin-top: 6px;
}

.effect-panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.effect-panel-heading > span {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 9px;
}

.selected-effect-strip {
  align-items: center;
  background: #20222d;
  border: 2px solid #090a0d;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 12px;
  outline: 2px solid #3a3944;
  padding: 10px;
}

.selected-effect-strip strong,
.selected-effect-strip small {
  display: block;
}

.selected-effect-strip strong {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 9px;
  line-height: 1.35;
  margin-top: 5px;
}

.selected-effect-strip small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  margin-top: 5px;
}

.selected-effect-strip .primary-button {
  min-width: 120px;
  padding: 9px 12px;
}

.effect-pool {
  align-content: start;
  display: grid;
  flex: 0 0 auto;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, 62px);
  margin-top: 12px;
  min-height: 134px;
  overflow: hidden;
}

.effect-pool > button {
  align-content: center;
  background: #20222d;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 6px;
  grid-template-columns: 26px minmax(0, 1fr);
  min-height: 0;
  outline: 2px solid #3a3944;
  overflow: hidden;
  padding: 7px;
  text-align: left;
}

.effect-pool > button.active {
  background: #29291f;
  outline-color: var(--gold);
}

.effect-pool > button.selected {
  border-color: var(--gold);
}

.effect-pool > button:disabled:not(.active) {
  cursor: not-allowed;
  opacity: 0.55;
}

.effect-pool > button > span {
  align-items: center;
  background: #15161c;
  border: 1px solid #55515f;
  color: var(--gold);
  display: flex;
  font-family: var(--pixel-font);
  height: 26px;
  justify-content: center;
}

.effect-pool strong,
.effect-pool small {
  display: block;
}

.effect-pool strong {
  font-family: var(--pixel-font);
  font-size: 7px;
  line-height: 1.35;
}

.effect-pool small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  margin-top: 5px;
}

.effect-pool > button i {
  grid-column: 1 / -1;
  line-height: 1;
}

.effect-pager {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

.effect-pager button {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 7px;
  min-height: 28px;
  outline: 2px solid #41404a;
  padding: 4px 8px;
  text-transform: uppercase;
}

.effect-pager button:disabled {
  color: #676773;
  cursor: not-allowed;
}

.effect-pager span {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 8px;
}

@media (max-width: 800px) {
  .spell-effect-layout {
    grid-template-columns: 1fr;
  }

  .effect-slots-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .effect-pool {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selected-effect-strip {
    grid-template-columns: 1fr;
  }
}

.talent-tier {
  align-items: stretch;
  border-bottom: 1px solid #393943;
  display: grid;
  gap: 15px;
  grid-template-columns: 115px 1fr;
  padding: 16px 0;
}

.tier-label {
  align-items: flex-start;
  border-right: 2px solid #353640;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 12px;
}

.tier-label span {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 8px;
}

.tier-label small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  margin-top: 8px;
}

.tier-talents {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.talent-node {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  display: flex;
  flex-direction: column;
  min-height: 190px;
  outline: 2px solid #41404a;
  padding: 11px;
}

.talent-node.available {
  outline-color: #77623b;
}

.talent-node.invested {
  background: #26271f;
  outline-color: var(--gold);
}

.talent-node.locked:not(.invested) {
  opacity: 0.62;
}

.talent-node-header {
  align-items: center;
  display: flex;
  gap: 9px;
}

.talent-node-header > span {
  align-items: center;
  background: #15161c;
  border: 1px solid #55515f;
  color: var(--gold);
  display: flex;
  flex: 0 0 37px;
  font-family: var(--pixel-font);
  height: 37px;
  justify-content: center;
}

.talent-node-header strong,
.talent-node-header small {
  display: block;
}

.talent-node-header strong {
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 7px;
  line-height: 1.45;
}

.talent-node-header small {
  color: var(--gold);
  margin-top: 2px;
}

.talent-node > p {
  color: var(--muted);
  flex: 1;
  font-size: 16px;
  line-height: 1;
  margin-top: 10px;
}

.rank-pips {
  display: flex;
  gap: 4px;
  margin: 10px 0;
}

.rank-pips i {
  background: #111218;
  border: 1px solid #484650;
  display: block;
  height: 6px;
  width: 18px;
}

.rank-pips i.filled {
  background: var(--gold);
  border-color: #f0ce82;
}

.talent-node > button {
  background: #17181e;
  border: 1px solid #08090c;
  color: var(--gold);
  cursor: pointer;
  min-height: 30px;
  outline: 1px solid #514d40;
  padding: 5px;
}

.talent-node > button:disabled {
  color: #77737e;
  cursor: not-allowed;
  font-size: 14px;
  outline-color: #3b3a43;
}

.talent-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding-top: 18px;
}

.talent-footer > span {
  color: var(--muted);
}

.talent-footer .text-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.gear-summary {
  align-items: center;
  background: #20222a;
  border: 2px solid #0a0b0e;
  display: grid;
  gap: 14px;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  margin-top: 20px;
  outline: 2px solid #42414c;
  padding: 14px 17px;
}

.gear-character {
  align-items: center;
  display: flex;
  gap: 12px;
}

.gear-character > span {
  align-items: center;
  background: #121319;
  border: 2px solid;
  display: flex;
  flex: 0 0 48px;
  font-family: var(--pixel-font);
  height: 48px;
  justify-content: center;
}

.gear-stat {
  border-left: 1px solid #464650;
  display: grid;
  padding-left: 14px;
}

.gear-stat strong {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 15px;
}

.gear-stat span {
  color: var(--muted);
  font-size: 15px;
  margin-top: 4px;
}

.equipment-layout {
  display: grid;
  gap: 17px;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  margin-top: 18px;
}

.equipped-panel,
.inventory-panel,
.crafting-panel,
.set-bonus-panel {
  background: #1c1e25;
  border: 2px solid #0a0b0e;
  outline: 2px solid #3e3d47;
  padding: 15px;
}

.equipped-panel,
.inventory-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.equipment-tabs {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.equipment-screen.crafting-active .gear-summary {
  gap: 10px;
  margin-top: 12px;
  padding: 10px 13px;
}

.equipment-screen.crafting-active .gear-character > span {
  flex-basis: 40px;
  height: 40px;
}

.equipment-screen.crafting-active .gear-stat strong {
  font-size: 13px;
}

.equipment-screen.crafting-active .gear-stat span {
  font-size: 13px;
}

.equipment-screen.crafting-active .equipment-tabs {
  margin-top: 12px;
}

.equipment-tab {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 8px;
  min-height: 44px;
  outline: 2px solid #41404a;
  padding: 8px 16px;
  text-transform: uppercase;
}

.equipment-tab.active,
.equipment-tab:hover {
  color: var(--gold);
  outline-color: var(--gold);
}

.equipment-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.equipment-heading > span {
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 7px;
}

.equipment-slots {
  display: grid;
  gap: 8px;
  margin-top: 13px;
  min-height: 0;
  overflow: hidden;
}

.equipment-slots > button {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 9px;
  grid-template-columns: 38px 1fr auto;
  min-height: 62px;
  outline: 2px solid #41404a;
  padding: 8px;
  text-align: left;
}

.equipment-slots > button:hover {
  outline-color: var(--gold);
}

.equipment-slots > button.selected-slot {
  background: #29291f;
  outline-color: var(--gold);
}

.equipment-slots > button > span {
  align-items: center;
  background: #15161c;
  color: var(--gold);
  display: flex;
  font-family: var(--pixel-font);
  height: 38px;
  justify-content: center;
}

.equipment-slots > button strong {
  font-size: 14px;
  color: var(--rarity-color, var(--ink));
}

.equipment-slots > button small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.equipment-slots .item-status i {
  color: var(--green);
  font-size: 14px;
  font-style: normal;
}

.inventory-list {
  display: grid;
  flex: 1;
  gap: 8px;
  margin-top: 13px;
  max-height: 442px;
  min-height: 0;
  overflow: hidden;
  padding: 2px;
}

.crafting-panel,
.set-bonus-panel {
  margin-top: 18px;
}

.equipment-screen.crafting-active .crafting-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 12px;
  min-height: 0;
  overflow: hidden;
}

.crafting-filter-bar {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.filter-select {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 7px;
  outline: 2px solid #41404a;
  padding: 8px 10px;
  flex: 1;
}

.filter-select:focus {
  outline-color: var(--gold);
}

.crafting-layout {
  display: grid;
  gap: 12px;
  flex: 1;
  grid-template-columns: minmax(230px, 1fr) minmax(0, 2fr);
  margin-top: 13px;
  min-height: 0;
  overflow: hidden;
}

.crafting-filters,
.crafting-available-panel,
.crafting-list-panel,
.crafting-detail-panel {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  display: flex;
  flex-direction: column;
  min-height: 0;
  outline: 2px solid #41404a;
  overflow: hidden;
  padding: 10px;
}

.crafting-filters {
  gap: 14px;
}

.crafting-available-panel {
  background: transparent;
  border: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(360px, 1.05fr) minmax(280px, 0.95fr);
  outline: 0;
  padding: 0;
}

.crafting-filter-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr);
}

.crafting-filter-grid button,
.crafting-level-row button {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  outline: 2px solid #41404a;
}

.crafting-filter-grid button {
  display: grid;
  gap: 4px;
  min-height: 48px;
  padding: 7px;
  text-align: left;
}

.crafting-filter-grid button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.crafting-filter-grid button.active,
.crafting-level-row button.active {
  background: #29291f;
  outline-color: var(--gold);
}

.crafting-filter-grid strong,
.crafting-filter-grid span {
  display: block;
}

.crafting-filter-grid strong {
  font-family: var(--pixel-font);
  font-size: 6px;
  line-height: 1.35;
}

.crafting-filter-grid span {
  color: var(--gold);
  font-size: 14px;
}

.crafting-level-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.crafting-level-row button {
  font-family: var(--pixel-font);
  font-size: 7px;
  min-height: 34px;
  min-width: 48px;
  padding: 6px 9px;
}

.crafting-list {
  display: grid;
  flex: 1;
  gap: 8px;
  margin-top: 10px;
  min-height: 0;
  overflow: hidden;
  padding: 2px;
}

.list-pager {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr auto;
  margin-top: 4px;
}

.list-pager button {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--gold);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 7px;
  min-height: 34px;
  outline: 2px solid #41404a;
  padding: 6px 10px;
}

.list-pager button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.55;
}

.list-pager span {
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 7px;
  text-align: center;
}

.crafting-list > button {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  border-top-color: var(--rarity-color, #a8a3ad);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 9px;
  grid-template-columns: 38px 1fr auto;
  min-height: 62px;
  outline: 2px solid #41404a;
  padding: 8px;
  text-align: left;
}

.crafting-list > button.selected {
  outline-color: var(--gold);
}

.crafting-list > button > span {
  align-items: center;
  background: #15161c;
  color: var(--gold);
  display: flex;
  font-family: var(--pixel-font);
  height: 38px;
  justify-content: center;
}

.crafting-list strong,
.crafting-list small {
  display: block;
}

.crafting-list small {
  color: var(--muted);
  margin-top: 3px;
}

.crafting-list i {
  color: var(--gold);
  font-size: 14px;
  font-style: normal;
  text-align: right;
}

.crafting-list i.ready {
  color: var(--green);
}

.crafting-list i.missing {
  color: #e36c79;
}

.crafting-detail {
  background: transparent;
  border: 0;
  border-top-color: var(--rarity-color, #a8a3ad);
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.crafting-detail .item-detail {
  flex: 0 0 auto;
}

.crafting-detail-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.crafting-detail-heading span {
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 7px;
}

.crafting-components {
  display: grid;
  flex: 1;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
}

.crafting-components > div {
  align-items: center;
  background: #15161c;
  display: grid;
  gap: 8px;
  grid-template-columns: 26px 1fr auto;
  padding: 7px;
}

.crafting-components > div.ready {
  color: var(--green);
}

.crafting-components > div.missing {
  color: #e36c79;
}

.crafting-components span {
  color: var(--gold);
  font-family: var(--pixel-font);
  text-align: center;
}

.crafting-components i {
  font-style: normal;
}

.set-bonus-list {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.set-bonus-list > div {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  color: var(--muted);
  display: grid;
  gap: 10px;
  grid-template-columns: 110px 1fr auto;
  outline: 2px solid #41404a;
  padding: 10px;
}

.set-bonus-list > div.active {
  color: var(--ink);
  outline-color: var(--gold);
}

.set-bonus-list strong,
.set-bonus-list i {
  color: var(--gold);
  font-style: normal;
}

.inventory-filter-clear {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--gold);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 7px;
  margin-top: 12px;
  outline: 2px solid #41404a;
  padding: 8px 10px;
}

.inventory-filter-clear:hover {
  outline-color: var(--gold);
}

.inventory-empty {
  color: var(--muted);
  padding: 28px 12px;
  text-align: center;
}

.inventory-list > button {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 9px;
  grid-template-columns: 38px 1fr auto;
  min-height: 62px;
  outline: 2px solid #41404a;
  padding: 8px;
  text-align: left;
}

.inventory-list > button.selected {
  outline-color: var(--gold);
}

.inventory-list > button > span,
.item-title > span {
  align-items: center;
  background: #15161c;
  color: var(--gold);
  display: flex;
  font-family: var(--pixel-font);
  height: 38px;
  justify-content: center;
}

.inventory-list strong,
.inventory-list small {
  display: block;
}

.inventory-list small {
  color: var(--muted);
  margin-top: 3px;
}

.inventory-list i {
  color: var(--green);
  font-size: 14px;
  font-style: normal;
}

.inventory-list .item-status {
  display: grid;
  gap: 3px;
  justify-items: end;
}

.inventory-list .item-quantity {
  color: var(--gold);
}

.rarity-uncommon {
  --rarity-color: #63c882;
}

.rarity-rare {
  --rarity-color: #62a9ed;
}

.rarity-epic {
  --rarity-color: #b584e3;
}

.rarity-legendary {
  --rarity-color: #f2a13a;
}

.rarity-common {
  --rarity-color: #a8a3ad;
}

.equipment-slots > button,
.inventory-list > button,
.item-detail {
  border-top-color: var(--rarity-color, #a8a3ad);
  border-top-width: 3px;
}

.inventory-list > button strong,
.item-detail h2 {
  color: var(--rarity-color, var(--ink));
}

.item-comparison {
  align-items: stretch;
  background: #1c1e25;
  border: 2px solid #0a0b0e;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto 1fr minmax(140px, 0.5fr);
  margin-top: 18px;
  min-height: 160px;
  outline: 2px solid #3e3d47;
  padding: 12px;
}

.item-detail {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  padding: 12px;
}

.item-title {
  align-items: center;
  display: flex;
  gap: 10px;
}

.item-title > span {
  flex: 0 0 42px;
  height: 42px;
}

.item-title small {
  color: var(--muted);
}

.item-detail > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 17px;
  margin-top: 11px;
}

.item-detail > p.owned-quantity {
  color: var(--gold);
}

.item-detail ul {
  color: var(--ink);
  list-style: none;
  margin: 11px 0 0;
  padding: 0;
}

.item-detail li {
  border-top: 1px solid #3a3a44;
  padding: 4px 0;
}

.empty-comparison {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.comparison-arrow {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-family: var(--pixel-font);
  font-size: 8px;
  justify-content: center;
}

.equip-action {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-end;
}

.discard-button {
  background: #2a1a1d;
  border: 2px solid #090a0d;
  color: #ef8994;
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 8px;
  outline: 2px solid #694048;
  padding: 11px 8px;
}

.discard-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.breakdown-button {
  background: #1a2a1d;
  border: 2px solid #090a0d;
  color: #89ef94;
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 8px;
  outline: 2px solid #406948;
  padding: 11px 8px;
}

.breakdown-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.component-note {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.comparison-delta {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.comparison-delta span {
  background: #15161c;
  padding: 5px 7px;
  text-align: center;
}

.comparison-delta .positive {
  color: #71d798;
}

.comparison-delta .negative {
  color: #e36c79;
}

.equipment-footer {
  color: var(--muted);
  padding-top: 15px;
}

.customize-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.customize-tabs button {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 8px;
  min-height: 44px;
  outline: 2px solid #41404a;
  padding: 8px 10px;
}

.customize-tabs button.active,
.customize-tabs button:hover {
  color: var(--gold);
  outline-color: var(--gold);
}

.customize-tabs button.game-selected,
.class-picker > button.game-selected,
.ability-slots button.game-selected,
.ability-library-actions button.game-selected,
.ability-library > button.game-selected,
.save-row .primary-button.game-selected {
  color: var(--ink);
}

.customize-tab-back {
  display: none;
}

.embedded-screen .gear-summary,
.embedded-screen .talent-toolbar {
  margin-top: 16px;
}

.customize-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 250px minmax(0, 1fr);
  margin-top: 16px;
}

.class-picker {
  border-right: 2px solid #353640;
  padding-right: 16px;
}

.class-picker > button {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  outline: 2px solid #41404a;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.class-picker > button:hover,
.class-picker > button.active {
  outline-color: var(--class-color);
}

.class-picker > button > span {
  align-items: center;
  background: #111218;
  color: var(--class-color);
  display: flex;
  flex: 0 0 35px;
  font-family: var(--pixel-font);
  height: 35px;
  justify-content: center;
}

.class-picker strong,
.class-picker small {
  display: block;
}

.class-picker strong {
  font-family: var(--pixel-font);
  font-size: 8px;
}

.class-picker small {
  color: var(--muted);
  margin-top: 4px;
}

.class-detail {
  align-items: center;
  background: #20222a;
  border-bottom: 2px solid #3b3b45;
  display: flex;
  gap: 16px;
  padding: 15px;
}

.class-detail h2 {
  font-size: 13px;
}

.class-detail p:last-child {
  color: var(--muted);
  font-size: 18px;
  margin-top: 5px;
}

.loadout-heading,
.ability-library-heading,
.save-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.ability-library-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.ability-library-pager {
  align-items: center;
  display: flex;
  gap: 6px;
}

.ability-library-pager > span {
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 8px;
}

.loadout-heading > span,
.save-row > span {
  color: var(--muted);
  font-size: 17px;
}

.ability-slots {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 12px;
}

.ability-slots button {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  min-height: 92px;
  outline: 2px solid #44434d;
  padding: 8px 3px;
  position: relative;
}

.ability-slots button.selected {
  outline-color: var(--gold);
  transform: translateY(-2px);
}

.ability-slots kbd {
  color: var(--muted);
  left: 5px;
  position: absolute;
  top: 4px;
}

.ability-slots span,
.ability-slots strong {
  display: block;
}

.ability-slots span {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 16px;
  margin-bottom: 8px;
}

.ability-slots strong {
  font-size: 14px;
}

.ability-library {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 11px;
  max-height: 335px;
  overflow-y: auto;
  padding: 2px;
}

.ability-library > button {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 38px 1fr auto;
  min-height: 78px;
  outline: 2px solid #44434d;
  padding: 9px;
  text-align: left;
}

.ability-library > button:hover:not(:disabled) {
  outline-color: var(--gold);
}

.ability-library > button.equipped {
  outline-color: var(--green);
}

.ability-library > button.locked {
  filter: grayscale(1);
  opacity: 0.5;
}

.ability-library > button > span {
  align-items: center;
  background: #15161c;
  color: var(--gold);
  display: flex;
  font-family: var(--pixel-font);
  height: 38px;
  justify-content: center;
}

.ability-library strong,
.ability-library small {
  display: block;
}

.ability-library small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  margin-top: 4px;
}

.ability-library i {
  color: var(--gold);
  font-size: 14px;
  font-style: normal;
}

.run-progress {
  display: flex;
  gap: 9px;
}

.run-progress span {
  align-items: center;
  background: #111218;
  border: 2px solid var(--edge);
  color: var(--muted);
  display: flex;
  font-family: var(--pixel-font);
  font-size: 9px;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.run-progress .active {
  border-color: var(--gold);
  color: var(--gold);
}

.run-progress .complete {
  background: var(--green);
  color: white;
}

.enemy-card {
  align-items: center;
  display: flex;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
}

.enemy-portrait {
  align-items: center;
  background: #481e29;
  border: 3px solid #0d0e12;
  color: var(--red-bright);
  display: flex;
  flex: 0 0 70px;
  font-family: var(--pixel-font);
  font-size: 25px;
  height: 70px;
  justify-content: center;
  outline: 2px solid var(--red);
  text-shadow: 3px 3px #12070a;
}

.enemy-portrait img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.enemy-info {
  flex: 1;
}

.enemy-info p {
  color: var(--muted);
  font-size: 21px;
  margin-top: 8px;
}

.bar-label {
  color: var(--ink);
  display: flex;
  font-size: 20px;
  justify-content: space-between;
}

.bar {
  background: #08090c;
  border: 2px solid #090a0d;
  height: 17px;
  overflow: hidden;
  position: relative;
}

.bar > span,
.bar > i {
  display: block;
  height: 100%;
  transition: transform 180ms linear;
  width: 100%;
  will-change: transform;
}

.enemy-health {
  margin-top: 5px;
}

.enemy-health > span {
  background: var(--red);
  box-shadow: inset 0 5px #cf4b59;
}

.hard-enemy-bars {
  display: grid;
  gap: 6px;
}

.hard-enemy-bars .enemy-health {
  position: relative;
}

.hard-enemy-bars .enemy-health em {
  color: #fff7df;
  font-family: var(--pixel-font);
  font-size: 7px;
  font-style: normal;
  left: 8px;
  position: absolute;
  text-shadow: 0 1px 0 #111;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.combat-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.8fr);
  margin-top: 18px;
}

.party-panel,
.combat-log {
  min-height: 390px;
  padding: 18px;
}

.combat-side-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel-heading,
.resource-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.panel-heading > span {
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 8px;
}

.party-grid {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 17px;
}

.party-member {
  background: var(--panel-light);
  border: 2px solid #0a0b0e;
  contain: layout style;
  color: var(--ink);
  cursor: pointer;
  min-height: 92px;
  outline: 2px solid #3a3944;
  padding: 10px;
  position: relative;
  text-align: left;
}

.party-member:first-child {
  grid-column: auto;
}

.raid-party-grid {
  gap: 7px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.raid-party-grid .party-member:first-child {
  grid-column: auto;
}

.party-member:hover {
  outline-color: var(--gold);
  transform: translateY(-1px);
}

.party-member.selected {
  background: #29291f;
  border-color: #f1ca68;
  box-shadow:
    inset 0 0 0 2px #6e5727,
    0 0 0 3px #17140c,
    0 0 16px rgba(229, 185, 95, 0.72);
  outline: 3px solid var(--gold);
  transform: translateY(-2px);
}

.party-member.selected .member-header strong {
  color: #ffe29a;
  text-shadow: 2px 2px #171107;
}

.party-member.selected .member-health {
  border-color: #d9b55a;
}

.target-marker {
  align-items: center;
  background: var(--gold);
  border: 2px solid #0a0b0e;
  color: #21180a;
  display: none;
  font-family: var(--pixel-font);
  font-size: 7px;
  gap: 5px;
  padding: 5px 7px;
  position: absolute;
  right: 7px;
  text-transform: uppercase;
  top: -12px;
  z-index: 2;
}

.party-member.selected .target-marker {
  display: flex;
}

.target-marker i {
  border-bottom: 4px solid transparent;
  border-left: 6px solid #21180a;
  border-top: 4px solid transparent;
  height: 0;
  width: 0;
}

.party-member.dead {
  filter: grayscale(1);
  opacity: 0.48;
}

.party-member.dead.selected {
  filter: grayscale(0.35);
  opacity: 0.72;
}

.party-member > small {
  display: none;
}

.member-header {
  align-items: center;
  display: flex;
  gap: 8px;
}

.member-header strong {
  flex: 1;
  min-width: 0;
}

.member-header small {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 15px;
  text-align: right;
}

.party-panel-top {
  margin-bottom: 12px;
}

.role {
  align-items: center;
  border: 1px solid white;
  display: flex;
  font-family: var(--pixel-font);
  font-size: 7px;
  height: 19px;
  justify-content: center;
  width: 19px;
}

.role-tank {
  background: var(--blue);
}

.role-healer {
  background: var(--green);
}

.role-damage {
  background: var(--red);
}

.member-health {
  margin-top: 8px;
}

.member-health > span {
  background: var(--green);
  box-shadow: inset 0 4px #63bf82;
}

.member-health > i {
  background: rgba(85, 174, 231, 0.72);
  position: absolute;
  right: 0;
  top: 0;
}

.raid-party-grid .party-member {
  min-height: 66px;
  padding: 7px;
}

.raid-party-grid .member-header {
  gap: 5px;
}

.raid-party-grid .member-header strong {
  font-size: 18px;
}

.raid-party-grid .member-header small {
  display: none;
}

.member-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 18px;
  margin-top: 6px;
}

.member-effects span {
  font-size: 14px;
  padding: 0 5px;
}

.floating-combat-texts {
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 3;
}

.floating-heal {
  animation: floating-heal 0.9s ease-out forwards;
  color: #91f0b0;
  font-family: var(--pixel-font);
  font-size: 9px;
  left: 50%;
  position: absolute;
  text-shadow: 1px 1px #102016;
  top: 28px;
  transform: translateX(-50%);
  will-change: opacity, transform;
  white-space: nowrap;
}

@keyframes floating-heal {
  0% {
    opacity: 0;
    transform: translate(-50%, 6px) scale(0.85);
  }

  18% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -20px) scale(1);
  }
}

.buff {
  background: #244c36;
  color: #77dfa0;
}

.debuff {
  background: #5c2028;
  color: #ff8290;
}

.combat-log ol {
  list-style: none;
  margin: 17px 0 0;
  padding: 0;
}

.combat-log li {
  border-bottom: 1px solid #30313a;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.1;
  padding: 8px 2px;
}

.combat-log .heal {
  color: #72d99b;
}

.combat-log .danger {
  color: #f16d7b;
}

.combat-log .loot {
  color: var(--gold);
}

.action-panel {
  margin-top: 18px;
  padding: 12px 18px;
}

.resource-row strong {
  color: var(--ink);
  font-size: 20px;
}

.active-target-card {
  align-items: center;
  background: #29291f;
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 2px #5f4d28;
  display: flex;
  gap: 11px;
  min-width: 300px;
  padding: 9px 12px;
}

.active-target-card > .role {
  flex: 0 0 30px;
  font-size: 9px;
  height: 30px;
  width: 30px;
}

.active-target-card strong,
.active-target-card small {
  display: block;
}

.active-target-card strong {
  color: #ffe29a;
}

.active-target-card small {
  color: var(--muted);
  margin-top: 3px;
}

.mana-wrap {
  color: #82bfff;
  font-size: 17px;
  text-align: right;
  width: min(360px, 50%);
}

.party-mana-wrap {
  text-align: left;
  width: 100%;
}

.party-mana-wrap > span {
  display: block;
  margin-bottom: 4px;
}

.speed-badge {
  background: var(--gold);
  border: 2px solid #0a0b0e;
  color: #21180a;
  display: inline-block;
  font-family: var(--pixel-font);
  font-size: 8px;
  line-height: 1;
  margin: 0 0 5px;
  padding: 5px 7px;
  text-transform: uppercase;
}

.action-panel .resource-row {
  justify-content: flex-start;
}

.mana-bar {
  margin-top: 4px;
}

.mana-bar > span {
  background: var(--blue);
  box-shadow: inset 0 4px #60a9ed;
}

.spell-bar {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 16px;
}

.spell-bar.six-slots {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.vertical-spell-bar,
.vertical-spell-bar.six-slots {
  align-content: start;
  flex: 1;
  grid-template-columns: 1fr;
  margin-top: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.vertical-spell-bar .spell {
  min-height: 64px;
  padding: 8px 8px 8px 56px;
}

.vertical-spell-bar .spell-icon {
  font-size: 12px;
  height: 30px;
  left: 10px;
  margin: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
}

.vertical-spell-bar .spell strong {
  font-size: 14px;
}

.vertical-spell-bar .spell small {
  font-size: 12px;
}

.vertical-spell-bar .spell kbd {
  left: auto;
  right: 4px;
}

.empty-spell {
  align-items: center;
  color: #5e5b68;
  display: flex;
  justify-content: center;
}

.spell {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  contain: layout paint style;
  color: var(--ink);
  cursor: pointer;
  min-height: 112px;
  outline: 2px solid #494756;
  padding: 8px 5px;
  position: relative;
}

.spell:hover:not(:disabled) {
  outline-color: var(--gold);
  transform: translateY(-2px);
}

.spell:disabled {
  cursor: not-allowed;
  filter: grayscale(0.8);
  opacity: 0.48;
}

.iwt2-bottom-display .iwt2-bottom-spell {
  cursor: default;
}

.iwt2-bottom-display .iwt2-bottom-spell:hover {
  outline-color: #494756;
  transform: none;
}

.spell kbd {
  align-items: center;
  background: #090a0d;
  color: var(--muted);
  display: inline-flex;
  font-size: 11px;
  justify-content: center;
  left: 4px;
  min-height: 24px;
  max-width: calc(100% - 8px);
  overflow: hidden;
  padding: 2px 6px;
  position: absolute;
  text-overflow: ellipsis;
  white-space: nowrap;
  top: 4px;
}

.spell-icon {
  align-items: center;
  background: #5f4124;
  border: 2px solid #0a0b0e;
  color: #ffe6a7;
  display: flex;
  font-family: var(--pixel-font);
  font-size: 17px;
  height: 42px;
  justify-content: center;
  margin: 1px auto 7px;
  width: 42px;
}

.spell-group {
  background: #694e24;
}

.spell-shield {
  background: #255b78;
}

.spell-cleanse {
  background: #573c75;
}

.spell strong,
.spell small {
  display: block;
}

.spell strong {
  font-size: 16px;
}

.spell small {
  color: var(--muted);
}

.spell > i {
  align-items: center;
  background: rgba(7, 8, 11, 0.84);
  display: flex;
  font-style: normal;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.result-log {
  background: #17181e;
  border: 2px solid #08090c;
  margin-top: 14px;
  max-height: 240px;
  overflow-y: auto;
  padding: 8px;
  text-align: left;
}

.log-entry {
  border-bottom: 1px solid #30313a;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.2;
  padding: 7px 2px;
}

.log-entry:last-child {
  border-bottom: 0;
}

.log-entry.heal {
  color: #72d99b;
}

.log-entry.danger {
  color: #f16d7b;
}

.log-entry.loot {
  color: var(--gold);
}

.result-screen,
.pause-screen {
  align-items: center;
  background: rgba(5, 5, 8, 0.88);
  display: flex;
  inset: 0;
  justify-content: center;
  overflow-y: auto;
  padding: 16px;
  position: fixed;
  z-index: 10;
}

.pvp-round-countdown {
  align-items: center;
  background: rgba(5, 5, 8, 0.55);
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 9;
}

.pvp-round-countdown > div {
  background: var(--panel);
  border: 3px solid #0b0c0f;
  box-shadow: 8px 8px 0 #050507;
  min-width: 220px;
  outline: 2px solid var(--gold);
  padding: 28px;
  text-align: center;
}

.pvp-round-countdown h2 {
  color: var(--gold);
  font-size: clamp(48px, 8vw, 92px);
  line-height: 1;
  margin-top: 8px;
}

.result-screen > div,
.pause-screen > div {
  background: var(--panel);
  border: 3px solid #0b0c0f;
  box-shadow: 8px 8px 0 #050507;
  max-height: calc(100dvh - 32px);
  max-width: 520px;
  outline: 2px solid var(--gold);
  overflow-y: auto;
  padding: 32px;
  text-align: center;
}

.result-screen p:not(.eyebrow),
.pause-screen p:not(.eyebrow) {
  color: var(--muted);
  font-size: 22px;
  margin-top: 15px;
}

.reward-summary {
  margin-top: 14px;
}

.reward-summary > p {
  margin-top: 8px !important;
}

.reward-summary .level-gain {
  color: var(--gold) !important;
  font-family: var(--pixel-font);
  font-size: 12px !important;
}

.level-gain small {
  color: #d8c79d;
  display: block;
  font-family: var(--body-font);
  font-size: 18px;
  margin-top: 9px;
}

.reward-summary .ability-unlock {
  align-items: center;
  background: #213c2b;
  border: 1px solid #4f9c68;
  color: #83dea2 !important;
  display: flex;
  font-size: 18px !important;
  gap: 9px;
  justify-content: center;
  padding: 7px;
}

.reward-summary .efficiency-result small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.ability-unlock span {
  color: var(--gold);
  font-family: var(--pixel-font);
}

.reward-summary .reward-error {
  color: #ff8190 !important;
}

.run-loot-rolls {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.run-loot-rolls > div {
  align-items: center;
  background: #17181e;
  border-left: 3px solid #55515e;
  column-gap: 10px;
  display: grid;
  font-size: 15px;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  padding: 6px 9px;
  text-align: left;
}

.run-loot-rolls > div.dropped {
  border-left-color: var(--gold);
}

.run-loot-rolls strong {
  color: var(--muted);
}

.run-loot-rolls span {
  color: var(--ink);
  text-align: right;
}

.run-loot-rolls > small {
  color: var(--muted);
}

.upgrade-choice-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.upgrade-choice-grid button {
  background: #20232c;
  border: 2px solid #08090c;
  color: var(--ink);
  cursor: pointer;
  margin-top: 0;
  min-height: 128px;
  min-width: 0;
  outline: 2px solid #4d4c58;
  padding: 12px;
  text-align: left;
}

.upgrade-choice-grid button:hover,
.upgrade-choice-grid button:focus,
.upgrade-choice-grid button:focus-visible {
  outline-color: var(--gold);
}

.upgrade-choice-grid strong,
.upgrade-choice-grid small {
  display: block;
}

.upgrade-choice-grid strong {
  color: var(--gold);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.upgrade-choice-grid .selected-upgrade,
.selected-upgrade {
  outline-color: var(--gold);
}

.upgrade-choice-grid small,
.roguelike-upgrade-list {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.25;
  margin-top: 10px;
  overflow-wrap: anywhere;
}

.bonus-item {
  border-top: 2px solid var(--gold);
  margin-top: 14px;
  padding-top: 14px;
}

.bonus-item-detail {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.bonus-item-detail > span {
  align-items: center;
  background: #4a3720;
  color: var(--gold);
  display: flex;
  flex: 0 0 38px;
  font-family: var(--pixel-font);
  height: 38px;
  justify-content: center;
}

.bonus-item-detail strong {
  color: var(--rarity-color, var(--ink));
  font-size: 16px;
}

.bonus-item-detail small {
  color: var(--muted);
}

.pvp-match-screen {
  gap: 0;
  height: calc(100dvh - 24px);
  margin-top: 0;
  overflow: hidden;
  padding: 8px;
}

.pvp-board {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.pvp-side {
  gap: 8px;
  min-height: 0;
  padding: 8px;
}

.pvp-match-queue-panel {
  gap: 14px;
}

.pvp-match-queue-panel .secondary-result-button {
  margin: 0 auto;
  max-width: 220px;
}

.pvp-screen-tools {
  align-items: center;
  display: flex;
  gap: 12px;
}

.pvp-resource-row {
  justify-content: flex-end;
}

.pvp-side-bars {
  display: grid;
  gap: 8px;
  min-width: min(320px, 45%);
  width: min(360px, 48%);
}

.pvp-clear-wrap,
.pvp-resource-wrap {
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 7px;
  text-align: right;
  width: 100%;
}

.pvp-clear-wrap > span,
.pvp-resource-wrap > span {
  display: block;
  margin-bottom: 4px;
}

.pvp-clear-wrap .bar,
.pvp-resource-wrap .bar {
  height: 13px;
}

.pvp-clear-wrap {
  color: #ff8d9a;
}

.pvp-resource-wrap {
  color: #82bfff;
}

.pvp-side .party-member,
.pvp-side .party-member > div,
.pvp-side .party-member > small {
  min-width: 0;
}

.pvp-side .party-grid {
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
}

.pvp-side .pvp-party-grid.raid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pvp-side .pvp-party-grid.raid .party-member {
  min-height: 96px;
  padding: 6px;
}

.pvp-side .pvp-party-grid.raid .member-header strong {
  font-size: 16px;
}

.pvp-side .pvp-party-grid.raid .member-header small {
  display: none;
}

.pvp-side .party-member {
  min-height: 76px;
  padding: 8px;
}

.pvp-side .party-member:first-child {
  grid-column: auto;
}

.pvp-side .member-header {
  gap: 5px;
}

.pvp-side .member-header strong {
  font-size: 19px;
}

.pvp-side .member-header small {
  font-size: 14px;
}

.pvp-side .bar {
  height: 14px;
}

.pvp-side .member-health {
  position: relative;
}

.pvp-side .member-health .health-text {
  align-items: center;
  color: #fff3c7;
  display: flex;
  font-family: var(--pixel-font);
  font-size: 7px;
  font-style: normal;
  inset: 0;
  justify-content: center;
  pointer-events: none;
  position: absolute;
  text-shadow: 1px 1px 0 #08090c, -1px -1px 0 #08090c;
  z-index: 2;
}

.pvp-side .party-member .member-header small {
  display: none;
}

.pvp-side .member-effects {
  margin-top: 4px;
}

.pvp-side .member-effects span {
  font-size: 11px;
  padding: 2px 4px;
}

.pvp-side .encounter-header .eyebrow {
  display: none;
}

.pvp-enemy-race {
  display: grid;
  gap: 8px;
}

.pvp-enemy-race small {
  font-size: 14px;
}

.pvp-side .roguelike-upgrade-list {
  font-size: 12px;
  line-height: 1.1;
  margin-top: 4px;
}

.pvp-bottom-spell-bar {
  background: var(--panel);
  border: 3px solid #0c0d11;
  box-shadow: 4px 4px 0 #08090c;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  outline: 2px solid var(--edge);
  padding: 8px;
}

.pvp-bottom-spell-bar .spell {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 7px;
  text-align: left;
}

.pvp-bottom-spell-bar .spell-icon {
  height: 34px;
  margin: 0;
  width: 34px;
}

.pvp-bottom-spell-bar .spell strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pvp-bottom-spell-bar .spell small {
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.pvp-choice-columns {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.pvp-choice-columns > div > strong {
  display: block;
  margin-bottom: 8px;
}

.pvp-choice-columns .upgrade-choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pvp-choice-columns .upgrade-choice-grid button {
  background: #252833;
  min-height: 70px;
  padding: 8px;
}

.pvp-leaderboard-row {
  grid-template-columns: 88px minmax(0, 1fr) 90px 90px 90px;
}

.pvp-upgrade-dialog {
  max-width: 1120px !important;
  padding: 12px !important;
  text-align: left !important;
  width: min(1120px, calc(100vw - 32px));
}

.pvp-upgrade-dialog > p:not(.eyebrow) {
  font-size: 18px !important;
  margin-top: 8px !important;
}

.pvp-upgrade-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pvp-upgrade-header h2 {
  font-size: 18px;
}

.pvp-upgrade-header > strong {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 16px;
  white-space: nowrap;
}

.pvp-upgrade-header > strong.danger {
  color: #ff8190;
}

.pvp-upgrade-dialog .pvp-choice-columns {
  gap: 10px;
  margin-top: 0;
}

.pvp-upgrade-dialog .upgrade-choice-grid strong {
  color: #ffe8a5;
  font-size: 9px;
  line-height: 1.25;
}

.pvp-upgrade-dialog .upgrade-choice-grid small {
  color: #d3d9e6;
  font-size: 12px;
  line-height: 1.15;
}

.pvp-upgrade-dialog .upgrade-choice-grid button.selected-upgrade {
  background: #303427;
  box-shadow: inset 0 0 0 2px #6e5727;
}

.pvp-upgrade-dialog .upgrade-choice-grid button.game-selected,
.pvp-upgrade-dialog .secondary-result-button.game-selected,
.pause-screen button.game-selected,
.pvp-match-queue-panel button.game-selected {
  box-shadow: 0 0 0 3px rgba(245, 196, 83, 0.45), inset 0 0 0 2px var(--gold);
}

.pvp-upgrade-dialog > .secondary-result-button {
  display: block;
  margin-left: auto;
  margin-top: 10px;
  width: fit-content;
}

.pvp-upgrade-dialog button:focus {
  outline-color: var(--gold);
}

@media (max-height: 620px) {
  .pvp-upgrade-dialog {
    max-height: calc(100dvh - 32px);
    overflow: hidden;
    padding: 10px !important;
  }

  .pvp-upgrade-header {
    margin-bottom: 8px;
  }

  .pvp-upgrade-header h2 {
    font-size: 14px;
  }

  .pvp-upgrade-header > strong {
    font-size: 12px;
  }

  .pvp-upgrade-dialog .pvp-choice-columns {
    gap: 8px;
  }

  .pvp-choice-columns > div > strong {
    margin-bottom: 6px;
  }

  .pvp-choice-columns .upgrade-choice-grid {
    gap: 7px;
  }

  .pvp-choice-columns .upgrade-choice-grid button {
    min-height: 54px;
    padding: 6px;
  }

  .pvp-upgrade-dialog .upgrade-choice-grid strong {
    font-size: 8px;
  }

  .pvp-upgrade-dialog .upgrade-choice-grid small {
    font-size: 10px;
    line-height: 1.1;
  }

  .pvp-upgrade-dialog .secondary-result-button {
    margin-left: auto;
    margin-top: 8px;
    min-height: 34px;
    padding: 6px 10px;
  }
}

.stadium-screen {
  min-height: 100dvh;
}

.stadium-board {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: calc(100dvh - 72px);
}

.stadium-header,
.stadium-pressure-panel {
  align-items: center;
  background: var(--panel);
  border: 3px solid #0c0d11;
  box-shadow: 4px 4px 0 #08090c;
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  outline: 2px solid var(--edge);
  padding: 12px 16px;
}

.stadium-header h2 {
  font-size: 20px;
}

.stadium-header > strong {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 26px;
}

.stadium-header p,
.stadium-header small,
.stadium-pressure-panel span {
  color: var(--muted);
  font-size: 13px;
}

.stadium-pressure-panel strong {
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 16px;
}

.stadium-side {
  min-height: 0;
}

.stadium-shop-dialog {
  max-width: 1180px !important;
  padding: 16px !important;
  text-align: left !important;
  width: min(1180px, calc(100vw - 32px));
}

.stadium-shop-summary {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-family: var(--pixel-font);
  font-size: 12px;
  gap: 16px;
  margin-bottom: 12px;
}

.stadium-shop-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: 240px minmax(0, 1fr);
}

.stadium-shop-tabs {
  display: grid;
  gap: 8px;
}

.stadium-shop-tabs button,
.stadium-shop-grid button {
  background: #303545;
  border: 2px solid #0b0c0f;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--pixel-font);
  outline: 2px solid #4d4c58;
}

.stadium-shop-tabs button {
  font-size: 9px;
  margin: 0;
  padding: 10px;
  text-align: left;
}

.stadium-shop-tabs button.active {
  background: #303427;
  outline-color: var(--gold);
}

.stadium-shop-layout h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

.stadium-shop-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stadium-shop-grid button {
  display: grid;
  gap: 10px;
  margin: 0;
  min-height: 128px;
  padding: 14px;
  text-align: left;
}

.stadium-shop-grid button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.stadium-shop-grid strong {
  color: #fff0b8;
  font-size: 11px;
  line-height: 1.35;
}

.stadium-shop-grid small,
.stadium-shop-layout p {
  color: #f0e8d2;
  font-family: var(--body-font);
  font-size: 22px;
  line-height: 1.05;
}

.dual-opponent-progress.stadium {
  grid-template-columns: 1fr 1fr;
}

.result-screen button,
.pause-screen button {
  background: var(--gold);
  border: 2px solid #08090c;
  color: #19150e;
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 9px;
  margin-top: 22px;
  outline: 2px solid #816630;
  padding: 13px 18px;
}

.result-screen .secondary-result-button,
.pause-screen .secondary-result-button {
  background: #252630;
  color: var(--ink);
  margin-left: 10px;
  outline-color: #4d4c58;
}

.pause-screen button {
  display: block;
  width: 100%;
}

.pause-screen .secondary-result-button {
  margin-left: 0;
  margin-top: 12px;
}

.result-screen .pvp-upgrade-dialog > .secondary-result-button {
  display: block;
  margin-left: auto;
  margin-top: 10px;
  width: fit-content;
}

.pause-screen button:focus-visible {
  outline: 3px solid #fff4a8 !important;
  box-shadow: 0 0 0 5px #8b6726, 0 0 18px rgba(229, 185, 95, 0.65);
  z-index: 1;
}

@media (min-width: 1000px) and (min-height: 900px) {
  .game-shell {
    width: min(1220px, calc(100% - 20px));
  }
}

@media (min-width: 1000px) and (max-height: 1120px) {
  .settings-screen,
  .equipment-screen,
  .talent-screen,
  .customize-screen {
    padding: 16px;
  }

  .settings-heading {
    padding: 8px 0 12px;
  }

  .settings-heading > p,
  .controller-preferences p:not(.eyebrow),
  .dual-screen-settings p:not(.eyebrow) {
    font-size: 16px;
  }

  .binding-tabs {
    margin: 12px 0;
  }

  .binding-tabs button {
    min-height: 38px;
  }

  .binding-list {
    gap: 7px;
  }

  .binding-list button {
    min-height: 39px;
    padding: 6px 9px;
  }

  .binding-list button > span {
    font-size: 16px;
  }

  .settings-footer {
    margin-top: 12px;
    padding-top: 10px;
  }

  .controller-preferences,
  .dual-screen-settings {
    margin-top: 14px;
    padding: 14px;
  }

  .controller-icon-options {
    grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(118px, auto));
  }

  .gear-summary,
  .talent-toolbar {
    margin-top: 12px;
    padding: 10px 12px;
  }

  .equipment-tabs,
  .talent-page-tabs {
    margin-top: 10px;
  }

  .equipment-tab {
    min-height: 38px;
  }

  .item-comparison {
    grid-template-columns: 1fr auto 1fr minmax(132px, 0.45fr);
    margin-top: 10px;
    min-height: 122px;
    padding: 9px;
  }

  .item-detail {
    padding: 9px;
  }

  .item-detail > p:not(.eyebrow),
  .item-detail ul {
    margin-top: 6px;
  }

  .equipment-layout {
    gap: 12px;
    margin-top: 10px;
  }

  .equipped-panel,
  .inventory-panel,
  .crafting-panel,
  .set-bonus-panel {
    padding: 10px;
  }

  .equipment-slots,
  .inventory-list,
  .crafting-list {
    gap: 6px;
    margin-top: 9px;
  }

  .equipment-slots > button,
  .inventory-list > button,
  .crafting-list > button {
    min-height: 46px;
    padding: 5px 7px;
  }

  .equipment-slots > button > span,
  .inventory-list > button > span,
  .crafting-list > button > span,
  .item-title > span {
    height: 31px;
  }

  .inventory-list,
  .crafting-list {
    max-height: none;
  }

  .crafting-panel {
    display: flex;
    flex-direction: column;
  }

  .crafting-filter-bar {
    flex: 0 0 auto;
  }

  .crafting-layout {
    flex: 1;
    min-height: 0;
  }

  .crafting-list {
    min-height: 0;
    overflow: hidden;
  }

  .crafting-detail {
    align-content: start;
    overflow: hidden;
  }

  .talent-tree {
    margin-top: 10px;
  }

  .talent-tier {
    gap: 10px;
    padding: 8px 0;
  }

  .talent-node {
    min-height: 0;
    padding: 8px;
  }

  .talent-node > p {
    font-size: 14px;
    line-height: 1;
    margin-top: 6px;
  }

  .rank-pips {
    margin: 6px 0;
  }

  .talent-footer {
    padding-top: 10px;
  }
}

@media (max-height: 720px) {
  .game-shell {
    padding: 6px 0;
    width: min(1180px, calc(100% - 20px));
  }

  .topbar {
    padding: 9px 14px;
  }

  .app-header {
    min-height: 56px;
  }

  .character-summary {
    gap: 9px;
  }

  .character-summary strong {
    font-size: 17px;
  }

  .menu-screen,
  .content-screen,
  .message-panel {
    margin-top: 8px;
    padding: 14px;
  }

  .main-menu-grid {
    gap: 8px;
  }

  .menu-card {
    min-height: 72px;
    padding: 10px;
  }

  .menu-card > span,
  .class-portrait {
    flex-basis: 44px;
    font-size: 14px;
    height: 44px;
  }

  .menu-card strong {
    margin-bottom: 4px;
  }

  .menu-card small {
    font-size: 15px;
  }

  .auth-shell {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: 10px;
  }

  .auth-panel {
    gap: 12px;
    max-height: calc(100dvh - 20px);
  }

  .auth-brand,
  .auth-card {
    padding: 14px;
  }

  .auth-brand {
    min-height: 0;
  }

  .auth-brand h1 {
    font-size: 28px;
    line-height: 1.15;
    margin: 6px 0 10px;
  }

  .auth-brand > p:last-child {
    font-size: 17px;
    line-height: 1.15;
  }

  .auth-tabs {
    gap: 5px;
  }

  .auth-tabs button {
    min-height: 34px;
  }

  .auth-card form {
    gap: 8px;
    margin-top: 10px;
  }

  .auth-card label {
    gap: 5px;
  }

  .auth-card input {
    font-size: 16px;
    padding: 7px 9px;
  }

  .auth-card .primary-button {
    min-height: 34px;
    padding: 8px 12px;
  }

  .auth-message {
    font-size: 13px;
    line-height: 1.1;
    margin-top: 8px;
    min-height: 24px;
  }

  .offline-divider {
    gap: 8px;
    margin: 8px 0;
  }

  .offline-entry {
    gap: 7px;
    padding: 10px;
  }

  .offline-entry p:not(.eyebrow) {
    display: none;
  }

  .offline-entry h2 {
    font-size: 9px;
  }

  .offline-resume-button,
  .offline-new-button {
    min-height: 32px;
  }

  .screen-heading {
    padding-bottom: 10px;
  }

  .screen-heading .eyebrow {
    display: none;
  }

  .screen-heading h1 {
    font-size: 16px;
  }

  .settings-screen {
    gap: 8px;
    padding: 10px;
  }

  .settings-shell .settings-screen {
    height: calc(100dvh - 12px);
  }

  .settings-nav {
    gap: 6px;
    grid-template-columns: minmax(76px, auto) minmax(0, 1fr);
  }

  .settings-tabs {
    gap: 6px;
  }

  .settings-tabs button,
  .settings-back-button {
    font-size: 7px;
    min-height: 32px;
    padding: 5px 8px;
  }

  .settings-tab-panel {
    scrollbar-width: thin;
  }

  .settings-screen .settings-tab-panel {
    overflow: hidden;
  }

  .dual-screen-settings,
  .controller-preferences {
    gap: 16px;
    margin: 10px 0 0;
    padding: 16px;
  }

  .dual-screen-settings.settings-tab-panel,
  .controller-preferences.settings-tab-panel {
    flex: 1 1 auto;
  }

  .dual-screen-settings {
    align-items: start;
    align-content: start;
    grid-template-columns: minmax(0, 1fr) minmax(238px, auto);
  }

  .dual-screen-settings h2,
  .settings-heading h2 {
    font-size: 12px;
  }

  .dual-screen-settings p:not(.eyebrow),
  .controller-preferences p:not(.eyebrow) {
    font-size: 14px;
    line-height: 1.15;
    margin-top: 4px;
  }

  .dual-screen-settings > small {
    font-size: 13px;
  }

  .dual-screen-actions {
    align-content: start;
    align-self: start;
    gap: 10px;
    min-width: 238px;
  }

  .dual-screen-actions button,
  .controller-preferences button {
    min-height: 46px;
    padding: 8px 12px;
  }

  .controller-preferences {
    align-items: stretch;
    align-content: start;
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(176px, auto));
  }

  .controller-preferences h3 {
    color: var(--ink);
    font-family: var(--pixel-font);
    font-size: 10px;
    line-height: 1.35;
    margin: 0;
  }

  .controller-icon-options {
    gap: 8px;
    grid-template-columns: minmax(130px, 1fr) repeat(3, minmax(120px, auto));
    padding: 10px;
  }

  .controller-icon-options > span {
    font-size: 7px;
  }

  .controller-icon-options button {
    font-size: 6px;
    gap: 5px;
    min-height: 38px;
  }

  .controller-style-preview .controller-face-icon {
    height: 18px;
    min-width: 18px;
  }

  .controller-style-preview .controller-face-playstation {
    font-size: 19px;
  }

  .settings-bindings-panel .settings-heading {
    padding: 4px 0 5px;
  }

  .settings-heading > p {
    font-size: 13px;
  }

  .settings-heading .eyebrow {
    display: none;
  }

  .binding-tabs {
    gap: 7px;
    margin: 6px 0;
  }

  .binding-tabs button {
    min-height: 28px;
  }

  .binding-list {
    gap: 4px;
    padding-right: 4px;
    overflow-y: auto;
  }

  .binding-list button {
    min-height: 24px;
    padding: 3px 8px;
  }

  .binding-list button > span {
    font-size: 12px;
  }

  .binding-list kbd {
    font-size: 6px;
    min-height: 18px;
  }

  .binding-list .controller-face-icon {
    font-size: 10px;
    height: 17px;
    min-width: 17px;
  }

  .binding-list .controller-face-playstation {
    font-size: 18px;
  }

  .settings-footer {
    font-size: 13px;
    margin-top: 6px;
    padding-top: 6px;
  }

  .settings-footer .text-button {
    padding: 6px 9px;
  }

  .dungeon-card {
    gap: 12px;
    grid-template-columns: 72px 1fr;
    margin-top: 10px;
    padding: 9px 10px;
  }

  .run-setup-panel,
  .run-summary-card {
    margin-top: 8px;
    padding: 8px;
  }

  .run-setup-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .run-setup-heading small {
    font-size: 14px;
    line-height: 1.1;
    text-align: left;
  }

  .tier-grid {
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
  }

  .tier-grid button {
    min-height: 52px;
    padding: 8px;
  }

  .activity-card-grid {
    gap: 8px;
    grid-template-columns: 1fr;
    margin-top: 8px;
  }

  .activity-card {
    gap: 5px 10px;
    grid-template-columns: 56px minmax(0, 1fr);
    min-height: 78px;
    padding: 8px;
  }

  .activity-card .dungeon-art {
    height: 52px;
    width: 52px;
  }

  .run-summary-card {
    gap: 10px;
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .run-summary-card > .dungeon-art {
    height: 58px;
  }

  .run-summary-copy p:not(.eyebrow) {
    font-size: 15px;
    line-height: 1;
  }

  .part-picker {
    grid-column: 1 / -1;
  }

  .activity-select,
  .part-buttons {
    grid-column: 1 / -1;
  }

  .dungeon-art {
    font-size: 15px;
    height: 62px;
  }

  .dungeon-card p:not(.eyebrow) {
    font-size: 16px;
    line-height: 1;
  }

  .tag-row {
    gap: 5px;
    margin-top: 6px;
  }

  .tag-row span {
    font-size: 14px;
    padding: 2px 6px;
  }

  .part-buttons {
    flex-direction: column;
    gap: 5px;
  }

  .part-buttons .primary-button,
  .text-button,
  .back-button {
    padding: 7px 10px;
  }

  .difficulty-section,
  .loot-preview-section,
  .leaderboard-section {
    margin-top: 8px;
    padding: 8px;
  }

  .equipment-heading .eyebrow {
    display: none;
  }

  .equipment-heading h2 {
    font-size: 11px;
  }

  .difficulty-select-row select {
    min-height: 36px;
  }

  .difficulty-summary {
    padding: 8px 10px;
  }

  .difficulty-summary small {
    font-size: 14px;
  }

  .difficulty-summary dl > div {
    padding: 5px 6px;
  }

  .customize-tabs {
    margin-top: 10px;
  }

  .customize-layout,
  .embedded-screen .gear-summary,
  .embedded-screen .talent-toolbar {
    margin-top: 10px;
  }

  .customize-screen {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 76px);
    overflow: hidden;
  }

  .customize-screen > .customize-layout,
  .customize-screen > .embedded-screen {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }

  .customize-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .class-picker,
  .loadout-editor {
    min-height: 0;
  }

  .ability-slots button {
    min-height: 76px;
  }

  .ability-library {
    max-height: 190px;
  }

  .enemy-card {
    gap: 10px;
    margin-top: 8px;
    padding: 8px;
  }

  .enemy-portrait {
    flex-basis: 48px;
    font-size: 17px;
    height: 48px;
  }

  .enemy-info p {
    font-size: 14px;
    line-height: 1;
    margin-top: 4px;
    max-height: 28px;
    overflow: hidden;
  }

  .bar-label {
    font-size: 15px;
  }

  .combat-layout {
    gap: 8px;
    grid-template-columns: minmax(0, 1.6fr) minmax(248px, 0.85fr);
    margin-top: 8px;
    min-height: 0;
  }

  .party-panel,
  .combat-log {
    min-height: 0;
    padding: 8px;
  }

  .party-panel-top {
    margin-bottom: 6px;
  }

  .party-grid {
    gap: 7px;
    margin-top: 8px;
  }

  .party-member {
    min-height: 72px;
    padding: 7px;
  }

  .member-header {
    gap: 5px;
  }

  .member-header small {
    font-size: 12px;
  }

  .member-health {
    margin-top: 5px;
  }

  .member-effects {
    gap: 3px;
    margin-top: 4px;
    min-height: 14px;
  }

  .member-effects span {
    font-size: 11px;
    padding: 0 4px;
  }

  .combat-side-rail .panel-heading .eyebrow {
    display: none;
  }

  .combat-side-rail .panel-heading h2 {
    font-size: 10px;
  }

  .vertical-spell-bar,
  .vertical-spell-bar.six-slots {
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
    overflow: hidden;
    padding-right: 0;
  }

  .vertical-spell-bar .spell {
    min-height: 54px;
    padding: 5px 5px 5px 36px;
  }

  .vertical-spell-bar .spell-icon {
    font-size: 10px;
    height: 22px;
    left: 6px;
    width: 22px;
  }

  .vertical-spell-bar .spell strong {
    font-size: 11px;
    line-height: 1.1;
  }

  .vertical-spell-bar .spell small {
    font-size: 10px;
    line-height: 1;
  }

  .vertical-spell-bar .spell kbd {
    font-size: 8px;
    min-height: 16px;
    padding: 1px 4px;
    right: 3px;
    top: 3px;
  }
}

@media (max-width: 800px) {
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 260px;
  }

  .combat-layout {
    grid-template-columns: 1fr;
  }

  .party-grid,
  .spell-bar,
  .spell-bar.six-slots,
  .main-menu-grid,
  .roguelike-mode-grid,
  .upgrade-choice-grid,
  .ability-library {
    grid-template-columns: 1fr;
  }

  .party-member:first-child,
  .menu-card:first-child {
    grid-column: auto;
  }

  .spell {
    min-height: 92px;
  }

  .resource-row {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .roguelike-variant-row,
  .roguelike-option-panel,
  .roguelike-timing-row,
  .pvp-screen-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .pvp-board,
  .stadium-board,
  .stadium-shop-layout,
  .pvp-choice-columns,
  .pvp-choice-columns .upgrade-choice-grid {
    grid-template-columns: 1fr;
  }

  .stadium-header,
  .stadium-pressure-panel,
  .stadium-shop-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .stadium-shop-grid {
    grid-template-columns: 1fr;
  }

  .active-target-card,
  .mana-wrap {
    width: 100%;
  }

  .active-target-card {
    min-width: 0;
  }

  .customize-layout {
    grid-template-columns: 1fr;
  }

  .talent-tier {
    grid-template-columns: 1fr;
  }

  .tier-label {
    border-bottom: 2px solid #353640;
    border-right: 0;
    padding-bottom: 9px;
  }

  .tier-talents {
    grid-template-columns: 1fr;
  }

  .talent-node {
    grid-column: auto !important;
  }

  .gear-summary,
  .equipment-layout,
  .crafting-layout,
  .crafting-available-panel {
    grid-template-columns: 1fr;
  }

  .item-comparison {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .set-bonus-list > div {
    grid-template-columns: 1fr;
  }

  .character-summary {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .difficulty-select-row,
  .toggle-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .difficulty-select-row label {
    align-items: stretch;
    flex-direction: column;
  }

  .difficulty-summary {
    grid-template-columns: 1fr;
  }

  .difficulty-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .difficulty-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-table {
    overflow-x: auto;
  }

  .leaderboard-header,
  .leaderboard-row {
    min-width: 760px;
  }

  .difficulty-grid > button {
    min-height: auto;
  }

  .loot-preview-grid {
    grid-template-columns: 1fr;
  }

  .gear-stat {
    border-left: 0;
    border-top: 1px solid #464650;
    padding-left: 0;
    padding-top: 8px;
  }

  .comparison-arrow {
    padding: 2px 0;
  }

  .class-picker {
    border-bottom: 2px solid #353640;
    border-right: 0;
    padding-bottom: 10px;
    padding-right: 0;
  }

  .ability-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dungeon-card {
    grid-template-columns: 1fr;
  }

  .progress-summary {
    grid-template-columns: 1fr;
  }

  .settings-heading,
  .settings-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .dual-screen-settings {
    grid-template-columns: 1fr;
  }

  .dual-screen-settings > small {
    grid-column: auto;
  }

  .android-display-list {
    grid-column: auto;
  }

  .dual-screen-actions {
    min-width: 0;
  }

  .controller-icon-options {
    grid-template-columns: 1fr;
  }

  .binding-list {
    grid-template-columns: 1fr;
  }

  .controller-keyboard {
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }

  .controller-keyboard-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .controller-keyboard-actions {
    grid-template-columns: 1fr 1fr;
  }

  .target-controls {
    align-items: flex-end;
    flex-direction: column;
    gap: 7px;
  }

  .dual-bottom-status {
    grid-template-columns: 1fr;
  }

  .dual-bottom-actions {
    min-height: 0;
    padding: 18px;
  }

  .dual-bottom-actions .active-target-card,
  .dual-bottom-actions .mana-wrap {
    min-width: 0;
    width: 100%;
  }

  .dual-bottom-actions .spell {
    min-height: 125px;
  }
}

/* ─── Admin Panel ─── */
.admin-screen {
  height: 100dvh;
  margin-top: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.admin-tab {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 8px;
  outline: 2px solid #494754;
  padding: 10px 18px;
  text-transform: uppercase;
}

.admin-tab.active {
  background: var(--gold);
  color: #19150e;
  outline-color: #816630;
}

.admin-tab:hover:not(.active) {
  color: var(--ink);
  outline-color: var(--gold);
}

.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-search {
  background: #111217;
  border: 2px solid #090a0d;
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 8px;
  outline: 2px solid #3e3d47;
  padding: 10px 12px;
  width: 100%;
}

.admin-search:focus {
  outline-color: var(--gold);
}

.admin-group-header {
  color: var(--gold);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 10px;
  margin: 12px 0 8px;
  padding: 8px 4px;
  text-transform: uppercase;
  user-select: none;
}

.admin-group-header:hover {
  color: #f0cb79;
}

.admin-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.admin-card {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  display: flex;
  flex-direction: column;
  gap: 8px;
  outline: 2px solid #494754;
  padding: 12px;
}

.boss-image-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.boss-image-card {
  align-items: start;
}

.boss-image-card img {
  aspect-ratio: 1;
  background: #481e29;
  border: 2px solid #090a0d;
  display: block;
  object-fit: cover;
  outline: 2px solid #7a2940;
  width: 84px;
}

.admin-thumb {
  aspect-ratio: 1;
  background: #1c1e25;
  border: 2px solid #090a0d;
  display: block;
  object-fit: cover;
  outline: 2px solid #41404a;
  width: 48px;
}

.boss-upload-button {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--gold);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--pixel-font);
  font-size: 7px;
  outline: 2px solid #41404a;
  padding: 8px 10px;
  text-transform: uppercase;
}

.boss-upload-button input {
  display: none;
}

.boss-upload-button:has(input:disabled) {
  color: var(--muted);
  cursor: wait;
}

.admin-item-header {
  align-items: center;
  display: flex;
  gap: 10px;
}

.admin-glyph {
  font-family: var(--pixel-font);
  font-size: 16px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  width: 32px;
}

.admin-item-meta {
  color: var(--muted);
  display: block;
  font-size: 7px;
  margin-top: 2px;
}

.admin-item-desc {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  margin: 0;
}

.admin-item-stats {
  display: flex;
  gap: 16px;
}

.admin-item-stats > span {
  color: var(--green);
  font-family: var(--pixel-font);
  font-size: 7px;
}

.admin-edit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-edit-form label {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-family: var(--pixel-font);
  font-size: 7px;
  gap: 8px;
  text-transform: uppercase;
}

.admin-edit-form input,
.admin-edit-form select,
.admin-edit-form textarea {
  background: #111217;
  border: 2px solid #090a0d;
  color: var(--ink);
  flex: 1;
  font-family: var(--pixel-font);
  font-size: 7px;
  outline: 2px solid #3e3d47;
  padding: 6px 8px;
}

.admin-edit-form textarea {
  min-height: 48px;
  resize: vertical;
}

.admin-edit-form input:focus,
.admin-edit-form select:focus,
.admin-edit-form textarea:focus {
  outline-color: var(--gold);
}

.admin-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Loot tab */
.admin-loot-selectors {
  display: flex;
  gap: 16px;
}

.admin-loot-selectors label {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-family: var(--pixel-font);
  font-size: 7px;
  gap: 8px;
  text-transform: uppercase;
}

.admin-loot-selectors select {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 8px;
  min-height: 36px;
  outline: 2px solid #41404a;
  padding: 0 10px;
}

.admin-loot-title {
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 9px;
  margin: 8px 0;
}

.admin-empty {
  color: var(--muted);
  font-size: 16px;
}

.admin-loot-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-loot-row {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  display: flex;
  gap: 10px;
  outline: 2px solid #494754;
  padding: 8px 12px;
}

.admin-loot-name {
  flex: 1;
  font-size: 14px;
}

.admin-loot-weight {
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 7px;
}

.admin-loot-chance {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 7px;
}

.admin-qty-input {
  background: #111217;
  border: 2px solid #090a0d;
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 7px;
  outline: 2px solid #3e3d47;
  padding: 4px 6px;
  width: 50px;
}

.admin-qty-input:focus {
  outline-color: var(--gold);
}

.danger-button {
  background: var(--red);
  border: 2px solid #08090c;
  color: #fff;
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 8px;
  outline: 2px solid #7a2940;
  padding: 8px 12px;
}

.danger-button:hover {
  background: var(--red-bright);
}

.admin-add-section {
  margin-top: 12px;
}

.admin-add-section summary {
  color: var(--gold);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 8px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.admin-add-section summary:hover {
  color: #f0cb79;
}

.admin-add-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-add-form label {
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-family: var(--pixel-font);
  font-size: 7px;
  gap: 4px;
  text-transform: uppercase;
}

.admin-add-form select,
.admin-add-form input {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 8px;
  outline: 2px solid #41404a;
  padding: 8px 10px;
}

.admin-add-form select:focus,
.admin-add-form input:focus {
  outline-color: var(--gold);
}

.admin-upgrade-toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 0.8fr) minmax(120px, 0.45fr) minmax(120px, 0.45fr) minmax(320px, 1.4fr);
}

.admin-upgrade-toolbar label,
.admin-upgrade-step label {
  align-items: stretch;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-family: var(--pixel-font);
  font-size: 7px;
  gap: 6px;
  text-transform: uppercase;
}

.admin-upgrade-toolbar select,
.admin-upgrade-step select {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 8px;
  min-height: 36px;
  outline: 2px solid #41404a;
  padding: 0 10px;
}

.admin-upgrade-chain {
  display: grid;
  gap: 10px;
}

.admin-upgrade-step {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.2fr);
  outline: 2px solid #494754;
  padding: 12px;
}

.admin-upgrade-current {
  align-items: center;
  display: flex;
  gap: 10px;
}

.admin-crafting-filters {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(120px, 0.5fr) minmax(180px, 0.8fr) minmax(260px, 1.5fr);
}

.admin-crafting-filters label,
.admin-recipe-selector {
  align-items: stretch;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-family: var(--pixel-font);
  font-size: 7px;
  gap: 8px;
  text-transform: uppercase;
}

.admin-crafting-filters select,
.admin-recipe-selector select {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  flex: 1;
  font-family: var(--pixel-font);
  font-size: 8px;
  min-height: 36px;
  outline: 2px solid #41404a;
  padding: 0 10px;
}

.admin-recipe-header {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 8px 0;
  padding: 12px;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  outline: 2px solid #494754;
}

.admin-recipe-image {
  aspect-ratio: 1;
  background: #1c1e25;
  border: 2px solid #090a0d;
  display: block;
  object-fit: cover;
  outline: 2px solid #41404a;
  width: 64px;
}

.admin-inline-field {
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-family: var(--pixel-font);
  font-size: 7px;
  gap: 6px;
  text-transform: uppercase;
}

.admin-inline-field input {
  background: #111217;
  border: 2px solid #090a0d;
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 8px;
  min-width: 230px;
  outline: 2px solid #3e3d47;
  padding: 8px 10px;
}

.admin-recipe-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.admin-class-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
}

.admin-class-list {
  background: #1c1e25;
  border: 2px solid #090a0d;
  display: flex;
  flex-direction: column;
  gap: 8px;
  outline: 2px solid #494754;
  padding: 12px;
}

.admin-class-list button {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 9px;
  grid-template-columns: 38px 1fr;
  min-height: 54px;
  outline: 2px solid #41404a;
  padding: 8px;
  text-align: left;
}

.admin-class-list button.active,
.admin-class-list button:hover {
  outline-color: var(--class-color, var(--gold));
}

.admin-class-list button > span,
.admin-class-hero > span {
  align-items: center;
  background: var(--class-color, var(--gold));
  color: #111217;
  display: flex;
  font-family: var(--pixel-font);
  font-size: 13px;
  height: 38px;
  justify-content: center;
}

.admin-class-list strong,
.admin-class-list small {
  display: block;
}

.admin-class-list small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.admin-class-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.admin-class-hero {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  display: grid;
  gap: 12px;
  grid-template-columns: 54px minmax(180px, auto) minmax(0, 1fr);
  outline: 2px solid #494754;
  padding: 12px;
}

.admin-class-hero > span {
  height: 54px;
}

.admin-class-hero h2 {
  font-family: var(--pixel-font);
  font-size: 13px;
}

.admin-class-hero small,
.admin-class-hero p {
  color: var(--muted);
  font-size: 14px;
}

.admin-class-table {
  display: grid;
  gap: 6px;
}

.admin-class-table-head,
.admin-class-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(230px, 1.5fr) minmax(90px, 0.7fr) minmax(110px, 0.6fr) minmax(65px, 0.45fr) minmax(80px, 0.5fr) minmax(70px, 0.45fr);
}

.admin-class-table-head {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 7px;
  padding: 0 10px;
  text-transform: uppercase;
}

.admin-class-row {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  outline: 2px solid #494754;
  padding: 9px 10px;
}

.admin-class-row > span {
  color: var(--muted);
  font-size: 13px;
}

.admin-class-row > span:first-child {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 30px minmax(0, 1fr);
}

.admin-class-row i {
  color: var(--gold);
  font-style: normal;
  text-align: center;
}

.admin-class-row strong,
.admin-class-row small {
  display: block;
}

.admin-class-row small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.admin-class-talent-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.admin-class-talent {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  display: flex;
  flex-direction: column;
  gap: 6px;
  outline: 2px solid #494754;
  padding: 10px;
}

.admin-class-talent > div {
  align-items: center;
  display: flex;
  gap: 8px;
}

.admin-class-talent > div > span {
  color: var(--gold);
  font-family: var(--pixel-font);
  width: 26px;
}

.admin-class-talent small,
.admin-class-talent p {
  color: var(--muted);
  font-size: 12px;
}

.admin-class-talent em {
  color: var(--green);
  font-family: var(--pixel-font);
  font-size: 7px;
  font-style: normal;
}

.iwt2-admin-panel {
  gap: 14px;
}

.iwt2-admin-summary {
  background: #1c1e25;
  border: 2px solid #090a0d;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-family: var(--pixel-font);
  font-size: 7px;
  gap: 14px;
  outline: 2px solid #494754;
  padding: 10px 12px;
  text-transform: uppercase;
}

.iwt2-admin-summary span {
  color: var(--gold);
}

.iwt2-admin-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(250px, 0.34fr) minmax(0, 1fr);
}

.iwt2-admin-entity-list,
.iwt2-admin-detail {
  background: var(--panel-light);
  border: 2px solid #090a0d;
  outline: 2px solid #494754;
  padding: 12px;
}

.iwt2-admin-entity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 12px;
}

.iwt2-admin-entity-list button {
  align-items: center;
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 64px;
  outline: 2px solid #34343d;
  padding: 9px;
  text-align: left;
}

.iwt2-admin-entity-list button.active,
.iwt2-admin-entity-list button:hover {
  background: #1f2633;
  outline-color: var(--gold);
}

.iwt2-admin-entity-list strong,
.iwt2-admin-entity-list small,
.iwt2-admin-detail-hero small {
  display: block;
}

.iwt2-admin-entity-list small,
.iwt2-admin-detail-hero small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  margin-top: 4px;
}

.iwt2-admin-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.iwt2-admin-detail-hero {
  align-items: center;
  background: #15161c;
  border: 2px solid #090a0d;
  display: grid;
  gap: 12px;
  grid-template-columns: 54px minmax(0, 1fr);
  outline: 2px solid #41404a;
  padding: 12px;
}

.iwt2-admin-detail-hero .iwt2-admin-token {
  height: 54px;
  width: 54px;
}

.iwt2-admin-detail-hero h2 {
  font-family: var(--pixel-font);
  font-size: 16px;
  line-height: 1.1;
  margin: 0;
}

.iwt2-admin-section {
  display: grid;
  gap: 10px;
}

.iwt2-admin-section-heading {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
}

.iwt2-admin-section-heading h3 {
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 10px;
  margin: 0;
  text-transform: uppercase;
}

.iwt2-admin-section-heading span {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 7px;
  text-transform: uppercase;
}

.iwt2-admin-token,
.iwt2-admin-swatch > span {
  align-items: center;
  background: var(--iwt2-entity-color, var(--gold));
  border: 2px solid #090a0d;
  color: #101115;
  display: flex;
  font-family: var(--pixel-font);
  font-size: 14px;
  height: 42px;
  justify-content: center;
  outline: 2px solid #5a5964;
  width: 42px;
}

.iwt2-admin-assets {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.iwt2-admin-assets a,
.iwt2-admin-swatch {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 178px;
  outline: 2px solid #41404a;
  padding: 10px;
  text-decoration: none;
}

.iwt2-admin-assets a:hover {
  color: var(--ink);
  outline-color: var(--gold);
}

.iwt2-admin-assets img {
  aspect-ratio: 16 / 10;
  background: #1c1e25;
  border: 2px solid #090a0d;
  object-fit: cover;
  width: 100%;
}

.iwt2-admin-assets strong,
.iwt2-admin-swatch strong {
  color: var(--ink);
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.iwt2-admin-assets small,
.iwt2-admin-swatch small {
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.iwt2-admin-hp {
  align-items: center;
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--gold);
  display: grid;
  font-family: var(--pixel-font);
  font-size: 8px;
  gap: 10px;
  grid-template-columns: 34px minmax(90px, 1fr) auto;
  outline: 2px solid #41404a;
  padding: 10px;
  text-transform: uppercase;
}

.iwt2-admin-hp input {
  background: #111217;
  border: 2px solid #090a0d;
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 8px;
  outline: 2px solid #3e3d47;
  padding: 8px 10px;
  width: 100%;
}

.iwt2-admin-hp input:focus {
  outline-color: var(--gold);
}

.iwt2-admin-attacks {
  display: grid;
  gap: 6px;
}

.iwt2-admin-attack-head,
.iwt2-admin-attack-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(100px, 0.9fr) minmax(100px, 0.9fr) minmax(90px, 0.7fr);
}

.iwt2-admin-attack-head {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 7px;
  padding: 0 8px;
  text-transform: uppercase;
}

.iwt2-admin-attack-row {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--muted);
  font-size: 12px;
  outline: 2px solid #41404a;
  padding: 8px;
}

.iwt2-admin-attack-row strong {
  color: var(--ink);
}

.iwt2-admin-attack-row small {
  color: var(--muted);
  grid-column: 1 / -1;
}

@media (max-width: 800px) {
  .admin-upgrade-toolbar,
  .admin-upgrade-step,
  .admin-class-layout,
  .admin-class-hero,
  .admin-class-table-head,
  .admin-class-row,
  .iwt2-admin-layout,
  .iwt2-admin-detail-hero,
  .iwt2-admin-hp,
  .iwt2-admin-attack-head,
  .iwt2-admin-attack-row {
    grid-template-columns: 1fr;
  }

  .iwt2-admin-entity-list {
    position: static;
  }

  .admin-crafting-filters {
    grid-template-columns: 1fr;
  }

  .admin-recipe-header,
  .admin-recipe-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-recipe-actions {
    margin-left: 0;
  }
}

.admin-rename-input {
  background: #111217;
  border: 2px solid #090a0d;
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 8px;
  min-width: 180px;
  outline: 2px solid #3e3d47;
  padding: 6px 8px;
  width: 100%;
}

.admin-rename-input:focus {
  outline-color: var(--gold);
}

.workshop-bottom-display {
  gap: 8px;
}

.workshop-bottom-summary {
  background: #1c1e25;
  border: 2px solid #0a0b0e;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.15;
  outline: 2px solid #41404a;
  padding: 10px;
}

.workshop-bottom-grid {
  display: grid;
  flex: 1;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
  overflow: hidden;
}

.workshop-bottom-grid article {
  align-items: center;
  background: #1c1e25;
  border: 2px solid #0a0b0e;
  color: var(--ink);
  display: grid;
  gap: 8px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  min-height: 58px;
  outline: 2px solid #41404a;
  padding: 8px;
}

.workshop-bottom-grid article > span {
  align-items: center;
  background: #15161c;
  color: var(--gold);
  display: flex;
  font-family: var(--pixel-font);
  height: 34px;
  justify-content: center;
}

.workshop-bottom-grid strong,
.workshop-bottom-grid small {
  display: block;
}

.workshop-bottom-grid strong {
  font-family: var(--pixel-font);
  font-size: 7px;
  line-height: 1.25;
}

.workshop-bottom-grid small,
.workshop-bottom-grid p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.05;
  margin-top: 3px;
}

.workshop-bottom-grid i {
  color: var(--gold);
  font-size: 12px;
  font-style: normal;
  text-align: right;
}

.equipment-action-strip,
.crafting-action-row {
  align-items: center;
  background: #1c1e25;
  border: 2px solid #0a0b0e;
  display: flex;
  gap: 8px;
  margin-top: 8px;
  min-height: 42px;
  outline: 2px solid #3e3d47;
  padding: 7px;
}

.equipment-action-strip .comparison-delta {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 190px;
}

.equipment-action-strip > p {
  color: var(--muted);
  margin: 0;
}

.crafting-action-row {
  justify-content: flex-end;
  margin-top: 6px;
  padding: 0;
}

@media (max-height: 620px) {
  .game-shell.workshop-shell {
    height: 100dvh;
    overflow: hidden;
    padding: 0;
    width: 100%;
  }

  .game-shell.workshop-shell > .app-header {
    display: none;
  }

  .workshop-shell .customize-screen {
    gap: 4px;
    height: 100dvh;
    margin-top: 0;
    overflow: hidden;
    padding: 6px;
  }

  .workshop-shell .customize-heading {
    display: none;
  }

  .workshop-shell .screen-heading {
    padding-bottom: 3px;
  }

  .workshop-shell .screen-heading .eyebrow,
  .workshop-shell .gear-character .eyebrow,
  .workshop-shell .talent-class-summary .eyebrow {
    display: none;
  }

  .workshop-shell .screen-heading h1 {
    font-size: 13px;
    line-height: 1.1;
  }

  .workshop-shell .back-button {
    font-size: 12px;
    min-height: 30px;
    padding: 5px 8px;
  }

  .workshop-shell .customize-tab-back {
    display: block;
  }

  .workshop-shell .customize-tabs,
  .workshop-shell .equipment-tabs,
  .workshop-shell .talent-page-tabs {
    gap: 5px;
    margin-top: 4px;
  }

  .workshop-shell .customize-tabs button,
  .workshop-shell .equipment-tab,
  .workshop-shell .talent-page-tabs button {
    font-size: 7px;
    min-height: 30px;
    padding: 5px 7px;
  }

  .workshop-shell .customize-tabs {
    grid-template-columns: 70px repeat(4, minmax(0, 1fr));
    margin-top: 0;
  }

  .workshop-shell .equipment-screen,
  .workshop-shell .talent-screen {
    gap: 0;
    height: auto;
    overflow: hidden;
  }

  .workshop-shell .gear-summary,
  .workshop-shell .talent-toolbar {
    gap: 6px;
    grid-template-columns: minmax(128px, 1.2fr) repeat(3, minmax(56px, 0.6fr));
    margin-top: 4px;
    padding: 5px 7px;
  }

  .workshop-shell .gear-character,
  .workshop-shell .talent-class-summary {
    gap: 7px;
  }

  .workshop-shell .gear-character > span,
  .workshop-shell .talent-class-summary > span {
    flex-basis: 30px;
    height: 30px;
  }

  .workshop-shell .gear-character h2,
  .workshop-shell .talent-class-summary h2,
  .workshop-shell .equipment-heading h2 {
    font-size: 9px;
    line-height: 1.2;
  }

  .workshop-shell .gear-stat {
    padding-left: 6px;
  }

  .workshop-shell .gear-stat strong,
  .workshop-shell .talent-points strong {
    font-size: 11px;
  }

  .workshop-shell .gear-stat span,
  .workshop-shell .talent-points span,
  .workshop-shell .talent-points small {
    font-size: 9px;
    line-height: 1;
    margin-top: 1px;
  }

  .workshop-shell .item-comparison {
    gap: 5px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) minmax(90px, 0.45fr);
    margin-top: 5px;
    min-height: 76px;
    padding: 5px;
  }

  .workshop-shell .item-comparison,
  .workshop-shell .crafting-detail-panel {
    display: none;
  }

  .workshop-shell .equipment-action-strip {
    gap: 5px;
    margin-top: 5px;
    min-height: 36px;
    padding: 5px;
  }

  .workshop-shell .equipment-action-strip .comparison-delta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 140px;
  }

  .workshop-shell .comparison-arrow {
    font-size: 11px;
    padding: 0;
  }

  .workshop-shell .item-detail {
    padding: 5px;
  }

  .workshop-shell .item-title {
    gap: 5px;
  }

  .workshop-shell .item-title > span {
    flex-basis: 26px;
    height: 26px;
  }

  .workshop-shell .item-detail h2 {
    font-size: 9px;
    line-height: 1.2;
  }

  .workshop-shell .item-detail small,
  .workshop-shell .item-detail > p:not(.eyebrow),
  .workshop-shell .item-detail li,
  .workshop-shell .comparison-delta span {
    font-size: 10px;
    line-height: 1.05;
  }

  .workshop-shell .item-detail > p:not(.eyebrow) {
    max-height: 22px;
    overflow: hidden;
  }

  .workshop-shell .item-detail ul {
    margin-top: 4px;
  }

  .workshop-shell .equip-action {
    gap: 4px;
  }

  .workshop-shell .equip-action .primary-button,
  .workshop-shell .equip-action .breakdown-button,
  .workshop-shell .equipment-footer .text-button,
  .workshop-shell .talent-footer .text-button {
    font-size: 7px;
    min-height: 26px;
    padding: 3px 5px;
  }

  .workshop-shell .equipment-layout {
    gap: 6px;
    grid-template-columns: minmax(0, 1.15fr) minmax(210px, 0.85fr);
    margin-top: 5px;
  }

  .workshop-shell .equipped-panel,
  .workshop-shell .inventory-panel,
  .workshop-shell .crafting-panel,
  .workshop-shell .crafting-filters,
  .workshop-shell .crafting-list-panel,
  .workshop-shell .crafting-detail-panel {
    padding: 5px;
  }

  .workshop-shell .equipment-slots {
    gap: 4px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 5px;
  }

  .workshop-shell .inventory-list,
  .workshop-shell .crafting-list {
    gap: 4px;
    margin-top: 5px;
    max-height: none;
  }

  .workshop-shell .equipment-slots > button,
  .workshop-shell .inventory-list > button,
  .workshop-shell .crafting-list > button {
    gap: 5px;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    min-height: 35px;
    padding: 4px 5px;
  }

  .workshop-shell .equipment-slots > button > span,
  .workshop-shell .inventory-list > button > span,
  .workshop-shell .crafting-list > button > span {
    height: 26px;
  }

  .workshop-shell .equipment-slots > button strong,
  .workshop-shell .inventory-list strong,
  .workshop-shell .crafting-list strong {
    font-size: 9px;
    line-height: 1.15;
  }

  .workshop-shell .equipment-slots > button small,
  .workshop-shell .inventory-list small,
  .workshop-shell .crafting-list small,
  .workshop-shell .inventory-list i,
  .workshop-shell .crafting-list i,
  .workshop-shell .equipment-slots .item-status i {
    font-size: 9px;
    line-height: 1;
  }

  .workshop-shell .list-pager {
    gap: 5px;
    margin-top: 3px;
  }

  .workshop-shell .list-pager button {
    font-size: 7px;
    min-height: 25px;
    padding: 3px 6px;
  }

  .workshop-shell .list-pager span,
  .workshop-shell .equipment-heading > span {
    font-size: 7px;
  }

  .workshop-shell .set-bonus-panel {
    display: none;
  }

  .workshop-shell .equipment-footer,
  .workshop-shell .talent-footer {
    font-size: 10px;
    min-height: 19px;
    padding-top: 4px;
  }

  .workshop-shell .equipment-screen.crafting-active .gear-summary {
    display: none;
  }

  .workshop-shell .equipment-screen.crafting-active .crafting-panel {
    margin-top: 5px;
  }

  .workshop-shell .crafting-layout {
    gap: 6px;
    grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr);
    margin-top: 6px;
  }

  .workshop-shell .crafting-available-panel {
    gap: 6px;
    grid-template-columns: minmax(0, 1fr);
  }

  .workshop-shell .crafting-filters {
    display: flex;
    gap: 6px;
  }

  .workshop-shell .crafting-filter-grid,
  .workshop-shell .crafting-level-row {
    gap: 4px;
  }

  .workshop-shell .crafting-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .workshop-shell .crafting-filter-grid button {
    min-height: 32px;
    padding: 4px 2px;
  }

  .workshop-shell .crafting-filter-grid strong {
    font-size: 5px;
  }

  .workshop-shell .crafting-filter-grid span {
    font-size: 10px;
  }

  .workshop-shell .crafting-level-row button {
    font-size: 6px;
    min-height: 24px;
    min-width: 31px;
    padding: 3px 5px;
  }

  .workshop-shell .crafting-detail {
    gap: 5px;
  }

  .workshop-shell .crafting-detail-heading span {
    font-size: 6px;
  }

  .workshop-shell .crafting-components {
    gap: 4px;
  }

  .workshop-shell .crafting-components > div {
    gap: 5px;
    grid-template-columns: 20px 1fr auto;
    min-height: 25px;
    padding: 4px;
  }

  .workshop-shell .crafting-components strong,
  .workshop-shell .crafting-components i {
    font-size: 9px;
  }

  .workshop-shell .talent-tree {
    gap: 4px;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    margin-top: 4px;
  }

  .workshop-shell .spell-effect-layout {
    gap: 6px;
    grid-template-columns: 172px minmax(0, 1fr);
    margin-top: 5px;
    overflow: hidden;
  }

  .workshop-shell .effect-slots-panel,
  .workshop-shell .effect-pool-panel {
    padding: 5px;
  }

  .workshop-shell .effect-slots-panel {
    gap: 5px;
    grid-auto-rows: minmax(43px, 1fr);
  }

  .workshop-shell .effect-slot {
    min-height: 0;
    overflow: hidden;
    padding: 5px;
  }

  .workshop-shell .effect-slot span,
  .workshop-shell .effect-pool > button i,
  .workshop-shell .effect-panel-heading > span,
  .workshop-shell .effect-pager span {
    font-size: 6px;
  }

  .workshop-shell .effect-slot strong {
    font-size: 6px;
    line-height: 1.15;
    margin-top: 3px;
  }

  .workshop-shell .effect-slot small {
    font-size: 9px;
    line-height: 1;
    margin-top: 2px;
    max-height: 18px;
    overflow: hidden;
  }

  .workshop-shell .effect-panel-heading h2 {
    font-size: 9px;
    line-height: 1.1;
  }

  .workshop-shell .selected-effect-strip {
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 5px;
    padding: 5px;
  }

  .workshop-shell .selected-effect-strip .eyebrow {
    display: none;
  }

  .workshop-shell .selected-effect-strip strong {
    font-size: 7px;
    line-height: 1.1;
    margin-top: 0;
  }

  .workshop-shell .selected-effect-strip small {
    font-size: 10px;
    line-height: 1;
    margin-top: 3px;
    max-height: 20px;
    overflow: hidden;
  }

  .workshop-shell .selected-effect-strip .primary-button {
    font-size: 7px;
    min-height: 25px;
    min-width: 72px;
    padding: 3px 6px;
  }

  .workshop-shell .effect-pool {
    gap: 5px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, 52px);
    margin-top: 5px;
  }

  .workshop-shell .effect-pool > button {
    gap: 4px;
    grid-template-columns: 22px minmax(0, 1fr);
    padding: 4px;
  }

  .workshop-shell .effect-pool > button > span {
    height: 22px;
  }

  .workshop-shell .effect-pool strong {
    font-size: 6px;
    line-height: 1.15;
  }

  .workshop-shell .effect-pool small {
    font-size: 9px;
    margin-top: 2px;
  }

  .workshop-shell .effect-pager {
    gap: 5px;
    margin-top: 4px;
  }

  .workshop-shell .effect-pager button {
    font-size: 6px;
    min-height: 22px;
    padding: 2px 5px;
  }

  .workshop-shell .talent-tier {
    gap: 6px;
    grid-template-columns: 66px minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
    padding: 4px 0;
  }

  .workshop-shell .tier-label {
    padding-right: 6px;
  }

  .workshop-shell .tier-label span {
    font-size: 6px;
  }

  .workshop-shell .tier-label small {
    font-size: 9px;
    line-height: 1;
    margin-top: 4px;
  }

  .workshop-shell .tier-talents {
    gap: 5px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 0;
    overflow: hidden;
  }

  .workshop-shell .talent-node {
    min-height: 0;
    overflow: hidden;
    padding: 5px;
  }

  .workshop-shell .talent-node-header {
    gap: 5px;
  }

  .workshop-shell .talent-node-header > span {
    flex-basis: 24px;
    height: 24px;
  }

  .workshop-shell .talent-node-header strong {
    font-size: 6px;
    line-height: 1.2;
  }

  .workshop-shell .talent-node-header small,
  .workshop-shell .talent-node > p,
  .workshop-shell .talent-node > button:disabled {
    font-size: 9px;
    line-height: 1;
  }

  .workshop-shell .talent-node > p {
    max-height: 28px;
    margin-top: 3px;
    overflow: hidden;
  }

  .workshop-shell .rank-pips {
    gap: 2px;
    margin: 3px 0;
  }

  .workshop-shell .rank-pips i {
    height: 4px;
    width: 12px;
  }

  .workshop-shell .talent-node > button {
    font-size: 7px;
    min-height: 22px;
    padding: 3px;
  }
}

@media (max-width: 700px) and (max-height: 620px) {
  .workshop-shell .gear-summary {
    grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(42px, auto));
  }

  .workshop-shell .item-comparison {
    grid-template-columns: minmax(0, 1fr) minmax(86px, 0.45fr);
    min-height: 60px;
  }

  .workshop-shell .item-comparison .comparison-arrow,
  .workshop-shell .item-comparison .empty-comparison,
  .workshop-shell .item-comparison article:nth-of-type(2) {
    display: none;
  }

  .workshop-shell .equipment-layout {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.72fr);
  }

  .workshop-shell .gear-stat span,
  .workshop-shell .equipment-slots > button small,
  .workshop-shell .equipment-slots .item-status,
  .workshop-shell .inventory-list i {
    display: none;
  }

  .workshop-shell .equipment-slots > button,
  .workshop-shell .inventory-list > button {
    grid-template-columns: 24px minmax(0, 1fr);
    min-height: 32px;
  }

  .workshop-shell .equipment-slots > button > span,
  .workshop-shell .inventory-list > button > span {
    height: 23px;
  }

  .workshop-shell .crafting-layout {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .workshop-shell .crafting-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workshop-shell .crafting-filter-grid button {
    min-height: 22px;
    padding: 3px;
  }

  .workshop-shell .crafting-filter-grid strong {
    font-size: 4px;
  }

  .workshop-shell .crafting-list > button {
    min-height: 68px;
  }

  .workshop-shell .crafting-action-row {
    background: transparent;
    border: 0;
    margin-top: 5px;
    min-height: 28px;
    outline: 0;
    padding: 0;
  }

  .workshop-shell .crafting-action-row .primary-button {
    font-size: 8px;
    min-height: 28px;
    padding: 4px 8px;
  }

  .workshop-shell .customize-layout {
    gap: 8px;
    grid-template-columns: 148px minmax(0, 1fr);
    margin-top: 5px;
    overflow: hidden;
  }

  .workshop-shell .class-picker {
    padding-right: 6px;
  }

  .workshop-shell .class-picker > .eyebrow {
    display: none;
  }

  .workshop-shell .class-picker > button {
    gap: 6px;
    margin-bottom: 5px;
    min-height: 44px;
    padding: 5px;
  }

  .workshop-shell .class-picker > button > span {
    flex-basis: 28px;
    height: 28px;
  }

  .workshop-shell .class-picker strong {
    font-size: 7px;
  }

  .workshop-shell .class-picker small {
    font-size: 10px;
    margin-top: 2px;
  }

  .workshop-shell .loadout-editor {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .workshop-shell .class-detail {
    gap: 8px;
    padding: 6px;
  }

  .workshop-shell .class-portrait {
    flex-basis: 32px;
    height: 32px;
  }

  .workshop-shell .class-detail h2 {
    font-size: 9px;
  }

  .workshop-shell .class-detail p:last-child,
  .workshop-shell .loadout-heading > span {
    display: none;
  }

  .workshop-shell .loadout-heading,
  .workshop-shell .ability-library-heading,
  .workshop-shell .save-row {
    margin-top: 6px;
  }

  .workshop-shell .ability-library-heading {
    gap: 8px;
  }

  .workshop-shell .ability-library-actions,
  .workshop-shell .ability-library-pager {
    gap: 5px;
  }

  .workshop-shell .ability-library-actions .text-button {
    font-size: 7px;
    min-height: 28px;
    padding: 4px 7px;
  }

  .workshop-shell .ability-library-pager > span {
    font-size: 7px;
  }

  .workshop-shell .ability-slots {
    gap: 5px;
    margin-top: 5px;
  }

  .workshop-shell .ability-slots button {
    min-height: 40px;
    padding: 5px 2px;
  }

  .workshop-shell .ability-slots span {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .workshop-shell .ability-slots strong {
    font-size: 9px;
    line-height: 1.1;
  }

  .workshop-shell .ability-library {
    flex: 1;
    gap: 5px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(52px, 1fr));
    margin-top: 5px;
    max-height: none;
    min-height: 0;
    overflow: hidden;
  }

  .workshop-shell .ability-library > button {
    align-content: center;
    gap: 5px;
    grid-template-columns: 1fr;
    min-height: 58px;
    padding: 5px;
    text-align: center;
  }

  .workshop-shell .ability-library > button > span {
    height: 26px;
  }

  .workshop-shell .ability-library strong {
    font-size: 8px;
    line-height: 1.1;
  }

  .workshop-shell .ability-library small,
  .workshop-shell .ability-library i {
    font-size: 9px;
    line-height: 1;
  }

  .workshop-shell .ability-library small {
    display: none;
  }

  .workshop-shell .ability-library i {
    font-size: 8px;
  }

  .workshop-shell .save-row .primary-button {
    font-size: 8px;
    min-height: 28px;
    padding: 4px 8px;
  }

  .workshop-shell .save-row > span {
    font-size: 11px;
  }

  .workshop-bottom-display {
    padding: 6px;
  }

  .workshop-bottom-grid {
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workshop-bottom-grid article {
    min-height: 50px;
    padding: 6px;
  }
}

@media (max-width: 700px) and (max-height: 620px) {
  .workshop-shell .equipment-layout {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.7fr);
  }

  .workshop-shell .equipment-action-strip .comparison-delta {
    display: none;
  }

  .workshop-shell .crafting-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .workshop-shell .crafting-available-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .workshop-shell .crafting-filter-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .workshop-shell .crafting-filter-grid button {
    min-height: 34px;
    padding: 4px 2px;
  }

  .workshop-shell .crafting-filter-grid strong {
    font-size: 5px;
  }

  .workshop-shell .crafting-filter-grid span {
    font-size: 10px;
  }

  .workshop-shell .crafting-level-row {
    flex-wrap: nowrap;
  }

  .workshop-shell .crafting-list > button {
    display: grid;
    min-height: 68px;
  }

  .workshop-shell .customize-layout {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .workshop-shell .ability-library {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(52px, 1fr));
  }

  .workshop-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 620px) {
  .workshop-shell .crafting-list > button {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .workshop-shell .crafting-list > button i {
    display: none;
  }

  .workshop-shell .talent-class-summary h2 {
    display: none;
  }

  .workshop-shell .talent-tier {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .workshop-shell .tier-talents {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workshop-shell .talent-node {
    grid-column: auto !important;
  }
}

@media (max-height: 620px) {
  .workshop-shell .customize-screen > .customize-layout {
    gap: 8px;
    grid-template-columns: 148px minmax(0, 1fr);
    margin-top: 5px;
    overflow: hidden;
  }

  .workshop-shell .class-picker {
    padding-right: 6px;
  }

  .workshop-shell .class-picker > .eyebrow {
    display: none;
  }

  .workshop-shell .class-picker > button {
    gap: 6px;
    margin-bottom: 5px;
    min-height: 44px;
    padding: 5px;
  }

  .workshop-shell .class-picker > button > span {
    flex-basis: 28px;
    height: 28px;
  }

  .workshop-shell .class-picker strong {
    font-size: 7px;
  }

  .workshop-shell .class-picker small {
    font-size: 10px;
    margin-top: 2px;
  }

  .workshop-shell .loadout-editor {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .workshop-shell .class-detail {
    gap: 8px;
    padding: 6px;
  }

  .workshop-shell .class-detail p:last-child,
  .workshop-shell .loadout-heading > span,
  .workshop-shell .ability-library small {
    display: none;
  }

  .workshop-shell .class-portrait {
    flex-basis: 32px;
    height: 32px;
  }

  .workshop-shell .class-detail h2 {
    font-size: 9px;
  }

  .workshop-shell .loadout-heading,
  .workshop-shell .ability-library-heading,
  .workshop-shell .save-row {
    margin-top: 6px;
  }

  .workshop-shell .ability-slots {
    gap: 5px;
    margin-top: 5px;
  }

  .workshop-shell .ability-slots button {
    min-height: 40px;
    padding: 5px 2px;
  }

  .workshop-shell .ability-slots span {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .workshop-shell .ability-slots strong {
    font-size: 9px;
    line-height: 1.1;
  }

  .workshop-shell .ability-library {
    flex: 1;
    gap: 5px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(52px, 1fr));
    margin-top: 5px;
    max-height: none;
    min-height: 0;
    overflow: hidden;
  }

  .workshop-shell .ability-library > button {
    align-content: center;
    gap: 5px;
    grid-template-columns: 1fr;
    min-height: 58px;
    padding: 5px;
    text-align: center;
  }

  .workshop-shell .ability-library > button > span {
    height: 26px;
  }

  .workshop-shell .ability-library strong {
    font-size: 8px;
    line-height: 1.1;
  }

  .workshop-shell .ability-library i {
    font-size: 8px;
    line-height: 1;
  }

}

@media (max-width: 700px) and (max-height: 620px) {
  .workshop-shell .customize-screen > .customize-layout {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .workshop-shell .ability-library {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.hunter-profile-screen {
  gap: 14px;
}

.hunter-profile-screen .back-button.game-selected,
.hunter-profile-screen .equipment-tab.game-selected,
.hunter-stat-tile.game-selected,
.collection-boss-button.game-selected,
.collection-drop-row.game-selected {
  color: var(--ink);
  outline-color: #fff4a8;
}

.hunter-profile-heading {
  align-items: center;
}

.hunter-profile-tabs {
  align-self: auto;
}

.hunter-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hunter-stat-tile {
  display: flex;
  min-height: 118px;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(229, 185, 95, 0.24);
  border-radius: 8px;
  background: rgba(19, 24, 31, 0.84);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.hunter-stat-tile span,
.hunter-stat-tile small {
  color: rgba(238, 232, 210, 0.68);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.hunter-stat-tile strong {
  color: #f4df9b;
  font-size: 1.45rem;
  line-height: 1.08;
}

.collection-log-layout {
  display: grid;
  flex: 1;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

.collection-boss-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
}

.collection-drop-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding: 2px;
}

.collection-boss-list {
  max-height: min(58vh, 420px);
  overflow: auto;
  padding-right: 4px;
}

.collection-boss-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(238, 232, 210, 0.12);
  border-radius: 8px;
  background: rgba(14, 18, 24, 0.78);
  color: #eee8d2;
  text-align: left;
}

.collection-boss-button:hover,
.collection-boss-button:focus-visible,
.collection-boss-button.selected {
  border-color: rgba(229, 185, 95, 0.62);
  background: rgba(46, 40, 28, 0.92);
}

.collection-boss-button > span,
.collection-boss-header > span,
.collection-drop-row > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: rgba(229, 185, 95, 0.14);
  color: #f4df9b;
  font-weight: 800;
}

.collection-boss-button strong,
.collection-boss-button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-boss-button small {
  grid-column: 2;
  color: rgba(238, 232, 210, 0.66);
  font-size: 0.76rem;
}

.collection-boss-detail {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(229, 185, 95, 0.2);
  border-radius: 8px;
  background: rgba(19, 24, 31, 0.84);
}

.collection-boss-header {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.collection-boss-header > span {
  width: 54px;
  height: 54px;
}

.collection-boss-header h2 {
  margin: 0;
  color: #f4df9b;
  font-size: 1.35rem;
}

.collection-boss-header small {
  color: rgba(238, 232, 210, 0.68);
}

.collection-drop-row {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 24px minmax(28px, 1fr) auto auto;
  gap: 4px;
  align-items: center;
  justify-items: start;
  min-height: 84px;
  padding: 7px;
  border: 1px solid rgba(238, 232, 210, 0.1);
  border-radius: 8px;
  background: rgba(9, 12, 17, 0.52);
  color: #eee8d2;
  text-align: left;
}

.collection-drop-row strong {
  align-self: center;
  min-width: 0;
  font-size: 0.7rem;
  line-height: 1.08;
}

.collection-drop-row small {
  color: rgba(238, 232, 210, 0.68);
  font-size: 0.64rem;
  font-weight: 700;
}

.collection-drop-row b {
  align-self: end;
  color: #f4df9b;
  font-size: 0.86rem;
  line-height: 1;
}

.collection-drop-row > span {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 0.72rem;
}

.collection-drop-row.missing {
  border-color: rgba(238, 232, 210, 0.08);
  background: rgba(10, 12, 16, 0.38);
  opacity: 0.46;
}

.collection-drop-row.missing.game-selected {
  opacity: 1;
}

.collection-drop-row.missing > span {
  background: rgba(238, 232, 210, 0.08);
  color: rgba(238, 232, 210, 0.54);
}

.collection-drop-row.missing strong,
.collection-drop-row.missing small,
.collection-drop-row.missing b {
  color: rgba(238, 232, 210, 0.58);
}

.collection-drop-row.owned {
  border-color: rgba(229, 185, 95, 0.32);
}

.collection-drop-row:focus-visible {
  outline: 2px solid #f4df9b;
  outline-offset: 2px;
}

.collection-drop-row.collection-rarity-common {
  border-color: rgba(238, 232, 210, 0.28);
}

.collection-drop-row.collection-rarity-stat {
  border-color: rgba(229, 185, 95, 0.46);
}

.collection-drop-row.collection-rarity-stat > span {
  background: rgba(229, 185, 95, 0.16);
  color: #f4df9b;
}

.collection-drop-row.collection-rarity-common > span {
  background: rgba(238, 232, 210, 0.1);
}

.collection-drop-row.collection-rarity-uncommon {
  border-color: rgba(79, 204, 126, 0.56);
}

.collection-drop-row.collection-rarity-uncommon > span {
  background: rgba(79, 204, 126, 0.14);
  color: #7feb9f;
}

.collection-drop-row.collection-rarity-rare {
  border-color: rgba(113, 208, 255, 0.6);
}

.collection-drop-row.collection-rarity-rare > span {
  background: rgba(113, 208, 255, 0.14);
  color: #9bdcff;
}

.collection-drop-row.collection-rarity-epic {
  border-color: rgba(193, 134, 255, 0.62);
}

.collection-drop-row.collection-rarity-epic > span {
  background: rgba(193, 134, 255, 0.16);
  color: #d9b6ff;
}

.collection-drop-row.collection-rarity-legendary {
  border-color: rgba(245, 159, 75, 0.64);
}

.collection-drop-row.collection-rarity-legendary > span {
  background: rgba(245, 159, 75, 0.16);
  color: #ffc078;
}

@media (max-width: 760px) {
  .collection-log-layout {
    grid-template-columns: 1fr;
  }

  .hunter-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hunter-stat-grid {
    gap: 8px;
  }

  .hunter-stat-tile {
    min-height: 78px;
    padding: 12px;
  }

  .collection-boss-list {
    max-height: 190px;
  }
}

@media (max-width: 1000px) and (max-height: 620px) {
  .hunter-profile-screen {
    gap: 10px;
    margin-top: 0;
    padding: 12px;
  }

  .hunter-profile-heading {
    padding-bottom: 10px;
  }

  .hunter-profile-tabs {
    gap: 6px;
    margin-top: 0;
  }

  .hunter-profile-screen .equipment-tab,
  .hunter-profile-screen .back-button {
    min-height: 34px;
    padding: 6px 10px;
  }

  .hunter-stat-grid {
    gap: 8px;
  }

  .hunter-stat-tile {
    min-height: 92px;
    padding: 10px;
  }

  .hunter-stat-tile strong {
    font-size: 1.05rem;
  }

  .collection-log-layout {
    gap: 10px;
    grid-template-columns: 198px minmax(0, 1fr);
  }

  .collection-boss-list {
    gap: 6px;
    max-height: none;
  }

  .collection-boss-button {
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 46px;
    padding: 6px;
  }

  .collection-boss-button > span {
    width: 32px;
    height: 32px;
    font-size: 0.68rem;
  }

  .collection-boss-detail {
    padding: 8px;
  }

  .collection-drop-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .collection-drop-row {
    grid-template-rows: 20px minmax(24px, 1fr) auto auto;
    min-height: 72px;
    padding: 5px;
  }

  .collection-drop-row > span {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 1000px) and (max-height: 620px) {
  .iwt2-screen-shell.content-screen {
    gap: 10px;
    margin-top: 8px;
    max-width: none;
    min-height: 0;
    overflow: hidden;
    padding: 10px 12px;
  }

  .iwt2-screen-shell.content-screen > .screen-heading {
    padding-bottom: 8px;
  }

  .iwt2-screen-shell.content-screen > .screen-heading .eyebrow {
    font-size: 6px;
    margin-bottom: 4px;
  }

  .iwt2-screen-shell.content-screen > .screen-heading h1 {
    font-size: 17px;
    line-height: 1.1;
  }

  .iwt2-screen-shell .iwt2-action-list,
  .iwt2-screen-shell .iwt2-info-list,
  .iwt2-settings-panel .iwt2-action-list,
  .iwt2-customize-layout .iwt2-action-list,
  .iwt2-loadout-preview .iwt2-info-list {
    gap: 4px;
    min-height: 0;
    overflow-y: auto;
  }

  .iwt2-screen-shell.content-screen > .iwt2-action-list,
  .iwt2-screen-shell.content-screen > .iwt2-info-list {
    flex: 1 1 auto;
  }

  .iwt2-action-row:not(:has(small)),
  .iwt2-info-row:not(:has(small)) {
    min-height: 32px;
    padding: 5px 10px;
  }

  .iwt2-settings-panel,
  .iwt2-customize-layout,
  .iwt2-settings-panel > *,
  .iwt2-customize-layout > *,
  .iwt2-loadout-preview {
    min-height: 0;
  }
}
