.talents2-environment-badge {
  position: fixed;
  top: 0.55rem;
  left: 50%;
  z-index: 2147483646;
  transform: translateX(-50%);
  pointer-events: none;
  padding: 0.38rem 0.8rem;
  border: 1px solid #d3ab5d;
  border-radius: 999px;
  background: rgba(8, 13, 23, 0.94);
  color: #f7ddb0;
  box-shadow: 0 0 18px rgba(211, 171, 93, 0.25);
  font: 700 0.72rem/1.1 "Source Sans 3", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes t2-wing-discovery-pulse {
  0%,
  100% {
    outline-color: rgba(255, 218, 108, 0.76);
    box-shadow:
      0 0 0 2px rgba(255, 219, 104, 0.36),
      0 0 18px rgba(255, 193, 54, 0.62),
      0 0 34px rgba(255, 167, 24, 0.34),
      inset 0 0 13px rgba(255, 221, 126, 0.2);
    filter: brightness(1.08);
  }

  50% {
    outline-color: #fff0a6;
    box-shadow:
      0 0 0 4px rgba(255, 232, 140, 0.62),
      0 0 30px rgba(255, 204, 73, 0.92),
      0 0 52px rgba(255, 153, 15, 0.56),
      inset 0 0 18px rgba(255, 235, 163, 0.36);
    filter: brightness(1.28);
  }
}

.t2-wing-discovery-highlight {
  position: relative;
  z-index: 3;
  border-color: #ffe07d !important;
  outline: 2px solid rgba(255, 218, 108, 0.76) !important;
  outline-offset: 3px;
  animation: t2-wing-discovery-pulse 1.25s ease-in-out infinite;
}

.t2-wing-discovery-highlight--shop {
  color: #fff0b3 !important;
  background:
    linear-gradient(90deg, rgba(116, 70, 13, 0.64), rgba(47, 31, 9, 0.94))
    !important;
}

@media (prefers-reduced-motion: reduce) {
  .t2-wing-discovery-highlight {
    animation: none;
    box-shadow:
      0 0 0 3px rgba(255, 219, 104, 0.55),
      0 0 28px rgba(255, 193, 54, 0.78),
      inset 0 0 14px rgba(255, 221, 126, 0.24);
    filter: brightness(1.18);
  }
}

.talents2-blocked {
  max-width: 42rem;
  margin: 15vh auto;
  padding: 2rem;
  border: 1px solid #4d6278;
  border-radius: 1rem;
  background: #08111e;
  color: #e8edf3;
  font-family: "Source Sans 3", sans-serif;
}

.talents2-blocked a {
  color: #94ddc1;
}

.t2-picker,
.t2-picker * {
  box-sizing: border-box;
}

.t2-picker {
  position: relative;
  height: 100dvh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  color: #eee7d6;
  background: #040813;
  font-family: "Source Sans 3", sans-serif;
}

.t2-picker button,
.t2-picker input {
  font: inherit;
}

.t2-picker button {
  color: inherit;
}

.t2-picker__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 6, 14, 0.97), rgba(8, 14, 27, 0.76), rgba(3, 6, 14, 0.95)),
    linear-gradient(0deg, rgba(3, 6, 14, 0.98), transparent 62%),
    url("/assets/background/magic-academy-character-select.webp") center / cover no-repeat;
}

.t2-picker__frame {
  position: relative;
  z-index: 1;
  width: min(1600px, calc(100% - 32px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 0 24px;
}

.t2-picker__header {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 116px;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  text-align: center;
}

.t2-picker__header > div > span {
  display: block;
  color: #d9b765;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.t2-picker__header h1 {
  margin: 2px 0 0;
  color: #f4eedf;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  line-height: 1;
  text-shadow: 0 5px 22px rgba(0, 0, 0, 0.72);
}

.t2-picker__header p {
  max-width: 820px;
  margin: 7px auto 0;
  color: #aeb8c8;
  font-size: 0.9rem;
  line-height: 1.35;
}

.t2-header-spacer {
  width: 116px;
}

.t2-header-button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(213, 178, 93, 0.42);
  border-radius: 6px;
  background: rgba(8, 16, 31, 0.9);
  box-shadow: inset 0 1px rgba(255, 244, 211, 0.08);
  color: #e5d9be;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.t2-header-button:hover,
.t2-header-button:focus-visible {
  border-color: #e1bd68;
  outline: none;
  background: rgba(25, 35, 53, 0.96);
  color: #fff5d9;
}

.t2-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.t2-overview-card {
  --t2-card-accent: #c89d4a;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(200, 157, 74, 0.42);
  border-radius: 9px;
  background: rgba(6, 14, 27, 0.96);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 244, 214, 0.025);
  transition:
    border-color 170ms ease,
    box-shadow 170ms ease,
    transform 170ms ease;
}

.t2-overview-card--arcanist {
  --t2-card-accent: #7f8ed9;
}

.t2-overview-card--warden {
  --t2-card-accent: #64ad91;
}

.t2-overview-card--nightblade {
  --t2-card-accent: #9971cb;
}

.t2-overview-card:hover,
.t2-overview-card:focus-within {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--t2-card-accent) 75%, #f0d59a 25%);
}

.t2-overview-card.is-selected {
  border-color: #e2bb5c;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(226, 187, 92, 0.36),
    0 0 28px rgba(203, 160, 67, 0.14);
}

.t2-overview-card__main {
  display: grid;
  grid-template-rows: clamp(330px, 45vh, 430px) minmax(0, 1fr);
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.t2-overview-card__main:focus-visible {
  box-shadow: inset 0 0 0 2px #f1cf7c;
}

.t2-overview-card__portrait {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  background: #060a12;
}

.t2-overview-card__portrait::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(5, 12, 24, 0.94), transparent 24%),
    linear-gradient(90deg, rgba(4, 8, 15, 0.12), transparent 65%);
}

.t2-overview-card__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.96) contrast(1.02);
  transform: translateY(var(--t2-art-y, 0)) scale(var(--t2-art-scale, 1));
  transform-origin: center top;
  transition: transform 180ms ease;
}

.t2-overview-art {
  --t2-art-scale: 1;
  --t2-art-y: 0;
}

.t2-overview-card__selected {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 5px 8px;
  border: 1px solid rgba(255, 232, 171, 0.58);
  border-radius: 4px;
  background: #d8ae51;
  color: #10131a;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.t2-overview-card__content {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 14px 15px 12px;
}

.t2-overview-card__content > strong {
  color: #f4ead3;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.42rem;
  line-height: 1;
}

.t2-overview-card__content > em {
  overflow: hidden;
  color: #d5aa4d;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t2-overview-card__content > small {
  min-height: 3.9em;
  color: #a9b4c4;
  font-size: 0.76rem;
  line-height: 1.45;
}

.t2-overview-card__content > q {
  padding: 7px 8px;
  border-left: 2px solid var(--t2-card-accent);
  background: rgba(255, 255, 255, 0.025);
  color: #d7d0bd;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
  quotes: none;
}

.t2-overview-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.t2-overview-card__tags span {
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--t2-card-accent) 50%, transparent);
  border-radius: 4px;
  background: rgba(8, 15, 27, 0.82);
  color: #ded4be;
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.t2-overview-card__details {
  min-height: 42px;
  margin: 0 14px 14px;
  border: 1px solid color-mix(in srgb, var(--t2-card-accent) 66%, #d8c18d 20%);
  border-radius: 5px;
  outline: none;
  background:
    linear-gradient(180deg, rgba(64, 76, 95, 0.42), rgba(14, 23, 37, 0.82)),
    color-mix(in srgb, var(--t2-card-accent) 14%, transparent);
  color: #f3e7cb;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.t2-overview-card__details:hover,
.t2-overview-card__details:focus-visible {
  border-color: #f0cd75;
  background:
    linear-gradient(180deg, rgba(94, 92, 85, 0.62), rgba(28, 31, 38, 0.92)),
    color-mix(in srgb, var(--t2-card-accent) 24%, transparent);
  color: #fff4d9;
}

.t2-class-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 10px;
  padding: 6px;
  border: 1px solid rgba(185, 151, 79, 0.22);
  border-radius: 9px;
  background: rgba(4, 10, 21, 0.88);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
}

.t2-class-tab {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(18, 29, 46, 0.58);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 170ms ease,
    background 170ms ease,
    box-shadow 170ms ease;
}

.t2-class-tab:hover,
.t2-class-tab:focus-visible {
  border-color: rgba(225, 189, 104, 0.5);
  outline: none;
  background: rgba(28, 42, 64, 0.82);
}

.t2-class-tab.is-active {
  border-color: #d4ad57;
  background: rgba(47, 48, 54, 0.9);
  box-shadow:
    inset 0 -2px #d4ad57,
    0 0 22px rgba(201, 161, 73, 0.12);
}

.t2-class-tab__name {
  color: #f0e8d5;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  font-weight: 800;
}

.t2-class-tab__role {
  overflow: hidden;
  color: #8e9aab;
  font-size: 0.7rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t2-class-tab.is-active .t2-class-tab__role {
  color: #d7bf86;
}

.t2-dossier {
  --t2-accent: #cb9f4d;
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(660px, 1.75fr);
  min-height: 590px;
  overflow: hidden;
  border: 1px solid rgba(213, 178, 93, 0.52);
  border-radius: 10px;
  background: rgba(5, 12, 24, 0.96);
  box-shadow:
    0 30px 85px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(213, 178, 93, 0.08);
}

.t2-dossier--arcanist {
  --t2-accent: #808ed9;
}

.t2-dossier--warden {
  --t2-accent: #64ad91;
}

.t2-dossier--nightblade {
  --t2-accent: #9a74c9;
}

.t2-dossier__hero {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  border-right: 1px solid rgba(213, 178, 93, 0.32);
  background: #070b13;
}

.t2-dossier__hero > img {
  width: 100%;
  height: 100%;
  min-height: 590px;
  object-fit: cover;
  object-position: center top;
  transform: translateY(var(--t2-art-y, 0)) scale(var(--t2-art-scale, 1));
  transform-origin: center top;
  animation: t2HeroReveal 320ms ease both;
}

.t2-dossier-art {
  --t2-art-scale: 1;
  --t2-art-y: 0;
}

.t2-dossier__hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(3, 7, 14, 0.96), transparent 46%),
    linear-gradient(90deg, rgba(3, 7, 14, 0.1), transparent 65%, rgba(3, 7, 14, 0.3));
}

.t2-dossier__identity {
  position: absolute;
  right: 22px;
  bottom: 22px;
  left: 22px;
  text-shadow: 0 3px 15px #000;
}

.t2-dossier__identity > span {
  color: #d9bd7a;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.t2-dossier__identity h2 {
  margin: 2px 0 10px;
  color: #fff6df;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2rem, 3vw, 3.35rem);
  line-height: 0.96;
}

.t2-dossier__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.t2-dossier__tags span {
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--t2-accent) 55%, transparent);
  border-radius: 4px;
  background: rgba(4, 9, 18, 0.82);
  color: #eee2c6;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.t2-dossier__content {
  min-width: 0;
  padding: 20px 22px;
}

.t2-presentation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(154, 172, 193, 0.16);
}

.t2-presentation__copy {
  display: grid;
  gap: 2px;
}

.t2-presentation__copy span {
  color: #e9dfca;
  font-size: 0.83rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.t2-presentation__copy small {
  color: #8f9bad;
  font-size: 0.75rem;
}

.t2-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  padding: 3px;
  border: 1px solid rgba(159, 179, 204, 0.26);
  border-radius: 6px;
  background: rgba(2, 8, 17, 0.82);
}

.t2-segmented button {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #8794a7;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.t2-segmented button:hover,
.t2-segmented button:focus-visible {
  outline: none;
  color: #f4ead6;
}

.t2-segmented button.is-active {
  background: var(--t2-accent);
  color: #07101c;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--t2-accent) 28%, transparent);
}

.t2-dossier__description {
  margin: 13px 0;
  color: #b5c0cf;
  font-size: 0.88rem;
  line-height: 1.48;
}

.t2-mechanics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.t2-mechanic-card {
  min-height: 86px;
  padding: 10px 12px;
  border: 1px solid rgba(147, 168, 193, 0.18);
  border-left: 3px solid color-mix(in srgb, var(--t2-accent) 76%, #fff 10%);
  border-radius: 5px;
  background: rgba(12, 23, 39, 0.84);
}

.t2-mechanic-card > span,
.t2-resource__head > span {
  display: block;
  margin-bottom: 5px;
  color: #90a1b7;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.t2-mechanic-card p,
.t2-mechanic-card ul {
  margin: 0;
  color: #e2e6ea;
  font-size: 0.76rem;
  line-height: 1.35;
}

.t2-mechanic-card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 10px;
  padding: 0;
  list-style: none;
}

.t2-mechanic-card li::before {
  margin-right: 5px;
  color: var(--t2-accent);
  content: "◆";
  font-size: 0.55rem;
}

.t2-mechanic-card--scale {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.t2-mechanic-card--scale strong {
  color: #fff0c4;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  line-height: 1.2;
}

.t2-resource {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--t2-accent) 42%, transparent);
  border-radius: 6px;
  background: rgba(9, 20, 35, 0.94);
}

.t2-resource__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.t2-resource__head > span {
  margin: 0;
}

.t2-resource__head strong {
  color: #f3e7c9;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.96rem;
}

.t2-resource__meter {
  height: 5px;
  margin: 7px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(124, 143, 166, 0.18);
}

.t2-resource__meter span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--t2-accent);
  box-shadow: 0 0 10px var(--t2-accent);
}

.t2-resource__effects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.t2-resource__effects p {
  margin: 0;
  color: #bbc5d2;
  font-size: 0.74rem;
  line-height: 1.35;
}

.t2-resource__effects b {
  color: #e6cf94;
}

.t2-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 13px 0 8px;
}

.t2-section-heading h3 {
  margin: 0;
  color: #f0e7d4;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.05rem;
}

.t2-section-heading p {
  margin: 2px 0 0;
  color: #8491a3;
  font-size: 0.7rem;
}

.t2-core-button {
  display: grid;
  gap: 2px;
  min-width: 205px;
  padding: 7px 10px;
  border: 1px solid rgba(217, 181, 96, 0.55);
  border-radius: 5px;
  background: rgba(51, 42, 28, 0.66);
  cursor: pointer;
  text-align: left;
}

.t2-core-button:hover,
.t2-core-button:focus-visible {
  border-color: #e0ba5e;
  outline: none;
  background: rgba(76, 59, 31, 0.78);
}

.t2-core-button span {
  color: #fae8b7;
  font-size: 0.76rem;
  font-weight: 900;
}

.t2-core-button small {
  color: #a99d88;
  font-size: 0.62rem;
  line-height: 1.2;
}

.t2-subclasses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.t2-subclass-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  min-height: 116px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(142, 162, 187, 0.22);
  border-radius: 6px;
  background: rgba(10, 20, 35, 0.82);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.t2-subclass-card:hover,
.t2-subclass-card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--t2-accent) 66%, #d8c8a1 20%);
  outline: none;
  background: rgba(19, 31, 49, 0.94);
}

.t2-subclass-card.is-active {
  border-color: var(--t2-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t2-accent) 42%, transparent);
}

.t2-subclass-card__portrait {
  display: block;
  width: 78px;
  height: 100%;
  min-height: 116px;
  overflow: hidden;
  border-right: 1px solid rgba(217, 181, 96, 0.22);
}

.t2-subclass-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 116px;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.94) contrast(1.03);
  transform: translateY(var(--t2-subclass-y, 0)) scale(var(--t2-subclass-scale, 1));
  transform-origin: center 19%;
}

.t2-subclass-art {
  --t2-subclass-scale: 1;
  --t2-subclass-y: 0;
}

.t2-subclass-card__body {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  padding: 9px 9px 9px 10px;
}

.t2-subclass-card__body strong {
  color: #f0e5ce;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.86rem;
}

.t2-subclass-card__body small {
  color: #9eabbc;
  font-size: 0.66rem;
  line-height: 1.28;
}

.t2-picker-actions {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(240px, 330px);
  justify-content: center;
  gap: 12px;
  padding: 14px 0 0;
}

.t2-name-field {
  display: grid;
  gap: 4px;
}

.t2-name-field input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(213, 178, 93, 0.42);
  border-radius: 6px;
  outline: none;
  background: rgba(5, 13, 27, 0.96);
  color: #f2ead8;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.t2-name-field input:focus {
  border-color: #dfb961;
  box-shadow: 0 0 0 2px rgba(223, 185, 97, 0.14);
}

.t2-name-field input::placeholder {
  color: #707d90;
}

.t2-name-field > span {
  color: #e2a18e;
  font-size: 0.72rem;
}

.t2-begin-button {
  height: 50px;
  padding: 0 28px;
  border: 1px solid #f0ce78;
  border-radius: 6px;
  background: #d5ad55;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.4),
    0 9px 28px rgba(211, 168, 72, 0.24);
  color: #0b1220 !important;
  font-size: 0.88rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.t2-begin-button:hover:not(:disabled),
.t2-begin-button:focus-visible:not(:disabled) {
  outline: none;
  background: #edc96f;
}

.t2-begin-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.t2-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background: rgba(1, 4, 10, 0.88);
  backdrop-filter: blur(8px);
}

.t2-talent-modal {
  width: min(1180px, 96vw);
  max-height: min(850px, 92dvh);
  overflow: hidden;
  border: 1px solid rgba(224, 186, 94, 0.68);
  border-radius: 10px;
  background: #071221;
  box-shadow: 0 35px 120px rgba(0, 0, 0, 0.78);
}

.t2-talent-modal > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(154, 174, 199, 0.2);
  background: #0b1a2d;
}

.t2-talent-modal > header span {
  color: #d5af58;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.t2-talent-modal h2 {
  margin: 2px 0 5px;
  color: #f5ead3;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.6rem;
}

.t2-talent-modal header p {
  margin: 0;
  color: #9eacbf;
  font-size: 0.82rem;
}

.t2-modal-close {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(222, 184, 93, 0.56);
  border-radius: 50%;
  background: #101d2d;
  color: #ead6a9 !important;
  font-size: 1.45rem !important;
  cursor: pointer;
}

.t2-modal-close:hover,
.t2-modal-close:focus-visible {
  border-color: #e4bd61;
  outline: none;
  background: #1a2a3e;
}

.t2-talent-tree {
  display: grid;
  gap: 18px;
  max-height: calc(92dvh - 116px);
  padding: 22px;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 20%, rgba(92, 116, 154, 0.13), transparent 42%),
    #06101d;
}

.t2-talent-tier {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.t2-talent-tier__nodes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 112px));
  min-height: 94px;
  align-items: stretch;
  justify-content: center;
  gap: clamp(18px, 4vw, 58px);
  padding: 9px 18px;
  border-top: 1px solid rgba(129, 151, 181, 0.1);
  border-bottom: 1px solid rgba(129, 151, 181, 0.1);
  background: rgba(9, 21, 37, 0.5);
}

.t2-talent-node {
  position: relative;
  display: grid;
  width: 112px;
  min-width: 112px;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 3px 7px;
  padding: 7px;
  border: 1px solid rgba(182, 151, 82, 0.4);
  border-radius: 6px;
  background: #0b192a;
  cursor: help;
  text-align: left;
}

.t2-talent-node.is-choice {
  border-color: rgba(151, 112, 202, 0.7);
}

.t2-talent-node:hover,
.t2-talent-node:focus-visible {
  z-index: 2;
  border-color: #e0b95e;
  outline: none;
  background: #13243a;
  box-shadow: 0 0 22px rgba(214, 172, 77, 0.18);
}

.t2-talent-node img {
  width: 44px;
  height: 44px;
  grid-row: 1 / 3;
  object-fit: cover;
  border: 1px solid rgba(221, 182, 90, 0.54);
  border-radius: 4px;
}

.t2-talent-node span {
  overflow: hidden;
  color: #e6dfd1;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.12;
  text-overflow: ellipsis;
}

.t2-talent-node b {
  color: #8f9db0;
  font-size: 0.6rem;
}

.t2-talent-tooltip {
  position: fixed;
  z-index: 2147483646;
  width: min(320px, calc(100vw - 24px));
  padding: 13px 14px;
  border: 1px solid rgba(224, 184, 90, 0.72);
  border-radius: 7px;
  pointer-events: none;
  background: #07111f;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.78);
}

.t2-talent-tooltip h4 {
  margin: 0 0 5px;
  color: #f3e6c8;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
}

.t2-talent-tooltip > p {
  margin: 0 0 10px;
  color: #c0cad6;
  font-size: 0.76rem;
  line-height: 1.4;
}

.t2-talent-tooltip dl {
  display: grid;
  gap: 4px;
  margin: 0;
}

.t2-talent-tooltip dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.t2-talent-tooltip dt,
.t2-talent-tooltip dd {
  margin: 0;
  font-size: 0.67rem;
}

.t2-talent-tooltip dt {
  color: #8291a5;
}

.t2-talent-tooltip dd {
  color: #e1d7c2;
  text-align: right;
}

.t2-talent-tooltip > strong {
  display: block;
  margin-top: 9px;
  color: #b895df;
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.t2-display-modal {
  width: min(460px, 94vw);
  padding: 22px;
  border: 1px solid rgba(224, 186, 94, 0.62);
  border-radius: 9px;
  background: #081525;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.76);
}

.t2-display-modal h2 {
  margin: 0;
  color: #f0e4cb;
  font-family: "Source Serif 4", Georgia, serif;
}

.t2-display-modal p {
  color: #9ba9bb;
  font-size: 0.84rem;
  line-height: 1.45;
}

.t2-display-modal > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.t2-display-modal button {
  min-height: 42px;
  border: 1px solid rgba(221, 181, 90, 0.5);
  border-radius: 5px;
  background: #122238;
  color: #eadfc8;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.t2-display-modal button:hover,
.t2-display-modal button:focus-visible {
  border-color: #dfb75c;
  outline: none;
  background: #1d3048;
}

html[lang="th"] .t2-picker,
html[lang="th"] .t2-picker button,
html[lang="th"] .t2-picker input {
  font-size-adjust: none;
}

html[lang="th"] .t2-picker p,
html[lang="th"] .t2-picker small,
html[lang="th"] .t2-picker button,
html[lang="th"] .t2-picker input {
  line-height: 1.55;
}

@keyframes t2HeroReveal {
  from {
    opacity: 0.2;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 1180px) {
  .t2-picker__frame {
    width: min(1040px, calc(100% - 24px));
  }

  .t2-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .t2-overview-card__main {
    grid-template-rows: 410px minmax(0, 1fr);
  }

  .t2-class-tab {
    display: grid;
    gap: 2px;
  }

  .t2-dossier {
    grid-template-columns: minmax(300px, 0.72fr) minmax(560px, 1.4fr);
  }

  .t2-dossier__content {
    padding: 17px;
  }

  .t2-subclass-card {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .t2-subclass-card__portrait {
    width: 66px;
  }

  .t2-subclass-card__body small {
    font-size: 0.62rem;
  }
}

@media (max-width: 900px) {
  .t2-picker__header {
    grid-template-columns: 86px minmax(0, 1fr) 86px;
  }

  .t2-header-spacer {
    width: 86px;
  }

  .t2-header-button {
    min-width: 0;
    padding: 0 9px;
  }

  .t2-class-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .t2-dossier {
    grid-template-columns: 1fr;
  }

  .t2-dossier__hero {
    min-height: 520px;
    border-right: 0;
    border-bottom: 1px solid rgba(213, 178, 93, 0.32);
  }

  .t2-dossier__hero > img {
    min-height: 520px;
  }
}

@media (max-width: 680px) {
  .t2-picker__frame {
    width: min(100% - 14px, 620px);
    padding-top: 10px;
  }

  .t2-overview-grid {
    grid-template-columns: 1fr;
  }

  .t2-overview-card__main {
    grid-template-rows: min(112vw, 470px) minmax(0, 1fr);
  }

  .t2-picker__header {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .t2-picker__header > div {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .t2-picker__header > .t2-header-button,
  .t2-header-spacer {
    grid-row: 2;
    width: auto;
  }

  .t2-picker__header p {
    font-size: 0.78rem;
  }

  .t2-class-tab__role {
    display: none;
  }

  .t2-dossier__hero,
  .t2-dossier__hero > img {
    min-height: 440px;
  }

  .t2-presentation {
    align-items: stretch;
    flex-direction: column;
  }

  .t2-mechanics,
  .t2-resource__effects {
    grid-template-columns: 1fr;
  }

  .t2-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .t2-core-button {
    width: 100%;
  }

  .t2-subclasses {
    grid-template-columns: 1fr;
  }

  .t2-subclass-card {
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 124px;
  }

  .t2-subclass-card__portrait {
    width: 92px;
    min-height: 124px;
  }

  .t2-subclass-card__body small {
    font-size: 0.72rem;
  }

  .t2-picker-actions {
    grid-template-columns: 1fr;
  }

  .t2-modal-backdrop {
    padding: 8px;
  }

  .t2-talent-modal {
    width: 100%;
    max-height: 96dvh;
  }

  .t2-talent-modal > header {
    padding: 15px;
  }

  .t2-talent-tree {
    padding: 12px 8px;
  }

  .t2-talent-tier {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .t2-talent-tier__nodes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    justify-content: stretch;
    overflow-x: hidden;
  }

  .t2-talent-node {
    width: 100%;
    min-width: 0;
  }

  .t2-display-modal > div {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .t2-dossier__hero > img,
  .t2-subclass-card {
    animation: none;
    transition: none;
  }
}

/* Experimental Mastery quick switcher. This stylesheet is loaded by /newtalents only. */
.t2-mastery-quick-switcher {
  --t2-mastery-accent: 217, 184, 129;
  --t2-mastery-accent-strong: #f2d58d;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(var(--t2-mastery-accent), 0.28);
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--t2-mastery-accent), 0.11), transparent 62%),
    linear-gradient(180deg, rgba(12, 22, 35, 0.96), rgba(5, 13, 24, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 10px 24px rgba(0, 0, 0, 0.24);
  container: t2-mastery-switcher / inline-size;
  isolation: isolate;
}

.t2-mastery-quick-switcher--gathering {
  --t2-mastery-accent: 113, 208, 147;
  --t2-mastery-accent-strong: #a9efbd;
  flex: 1 1 420px;
  width: min(100%, 620px);
  max-width: 620px;
  margin-inline: auto;
}

.t2-mastery-quick-switcher--crafting {
  --t2-mastery-accent: 197, 139, 222;
  --t2-mastery-accent-strong: #e4b5f1;
  width: min(100%, 640px);
  justify-self: center;
}

.t2-mastery-quick-switcher--combat {
  --t2-mastery-accent: 225, 165, 102;
  --t2-mastery-accent-strong: #ffd18d;
  width: min(100%, 760px);
  margin: 0 auto 8px;
}

.dungeon-combat-toolbar > .t2-mastery-quick-switcher--combat {
  flex: 1 1 430px;
  width: auto;
  max-width: 680px;
  margin: 0 12px;
}

.t2-mastery-quick-switcher__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 0 4px 0 3px;
  color: rgba(var(--t2-mastery-accent), 0.82);
  font: 900 9px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.t2-mastery-quick-switcher__label svg {
  width: 15px;
  height: 15px;
  overflow: visible;
  fill: rgba(var(--t2-mastery-accent), 0.18);
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.t2-mastery-quick-switcher__options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
}

.t2-mastery-quick-switcher__option {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 34px;
  padding: 5px 8px;
  overflow: hidden;
  border: 1px solid rgba(158, 169, 192, 0.18);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(29, 41, 58, 0.78), rgba(10, 18, 31, 0.86));
  color: rgba(226, 219, 202, 0.72);
  font-family: var(--font-ui, sans-serif);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.t2-mastery-quick-switcher__option:hover {
  border-color: rgba(var(--t2-mastery-accent), 0.52);
  color: #f5ead1;
  transform: translateY(-1px);
}

.t2-mastery-quick-switcher__option:focus-visible {
  outline: 2px solid rgba(var(--t2-mastery-accent), 0.88);
  outline-offset: 2px;
}

.t2-mastery-quick-switcher__option.is-active {
  border-color: rgba(var(--t2-mastery-accent), 0.86);
  background:
    radial-gradient(circle at 25% 0%, rgba(var(--t2-mastery-accent), 0.24), transparent 64%),
    linear-gradient(180deg, rgba(43, 48, 54, 0.96), rgba(18, 23, 31, 0.96));
  color: var(--t2-mastery-accent-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 214, 0.12),
    inset 3px 0 0 rgba(var(--t2-mastery-accent), 0.84),
    0 0 14px rgba(var(--t2-mastery-accent), 0.12);
}

.t2-mastery-quick-switcher__option.is-active::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--t2-mastery-accent-strong);
  box-shadow: 0 0 7px rgba(var(--t2-mastery-accent), 0.9);
}

.t2-mastery-quick-switcher__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding-inline: 4px;
  border: 1px solid rgba(var(--t2-mastery-accent), 0.22);
  border-radius: 4px;
  background: rgba(var(--t2-mastery-accent), 0.07);
  color: rgba(var(--t2-mastery-accent), 0.72);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.t2-mastery-quick-switcher__name {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.t2-mastery-quick-switcher__count {
  padding-right: 5px;
  color: rgba(213, 220, 233, 0.52);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.t2-mastery-quick-switcher__option.is-active .t2-mastery-quick-switcher__count {
  color: rgba(var(--t2-mastery-accent), 0.78);
}

@container t2-mastery-switcher (max-width: 560px) {
  .t2-mastery-quick-switcher__label {
    display: none;
  }
}

@container t2-mastery-switcher (max-width: 460px) {
  .t2-mastery-quick-switcher__count {
    display: none;
  }

  .t2-mastery-quick-switcher__option {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

.crafting-progress-strip {
  grid-template-columns:
    52px
    minmax(190px, 0.32fr)
    minmax(380px, 0.78fr)
    minmax(0, 1.2fr);
}

@media (max-width: 1420px) {
  .t2-mastery-quick-switcher__label {
    display: none;
  }

  .crafting-progress-strip {
    grid-template-columns:
      52px
      minmax(190px, 0.34fr)
      minmax(330px, 0.76fr)
      minmax(0, 1.2fr);
  }
}

@media (max-width: 1160px) {
  .crafting-progress-strip {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .crafting-progress-strip > .t2-mastery-quick-switcher--crafting,
  .crafting-progress-strip__actions {
    grid-column: 1 / -1;
  }

  .crafting-progress-strip > .t2-mastery-quick-switcher--crafting {
    width: 100%;
  }

  .dungeon-combat-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .dungeon-combat-toolbar > .t2-mastery-quick-switcher--combat {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin: 0;
  }
}

@media (max-width: 900px) {
  .t2-mastery-quick-switcher--gathering {
    order: 2;
    flex-basis: 100%;
    max-width: none;
  }

  .gather-header-actions {
    order: 3;
  }

  .t2-mastery-quick-switcher__count {
    display: none;
  }

  .t2-mastery-quick-switcher__option {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

@media (max-width: 580px) {
  .t2-mastery-quick-switcher {
    padding: 4px;
  }

  .t2-mastery-quick-switcher__options {
    gap: 3px;
  }

  .t2-mastery-quick-switcher__option {
    display: flex;
    justify-content: center;
    min-height: 32px;
    padding-inline: 5px;
  }

  .t2-mastery-quick-switcher__index {
    display: none;
  }

  .t2-mastery-quick-switcher__name {
    font-size: 9px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .t2-mastery-quick-switcher__option {
    transition: none;
  }
}

/* /newtalents-only character wings system. */
.inventory-player-panel {
  isolation: isolate;
  scrollbar-gutter: stable;
}

.inventory-player-panel--hero-showcase {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background-color: #010307;
  background:
    linear-gradient(
      180deg,
      rgba(3, 7, 13, 0.96) 0%,
      rgba(4, 10, 18, 0.94) 52%,
      rgba(2, 8, 14, 0.98) 100%
    ),
    radial-gradient(circle at 50% 21%, rgba(116, 146, 187, 0.13), transparent 43%);
}

.inventory-player-panel--hero-showcase::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 25%, transparent 0 20%, rgba(0, 0, 0, 0.12) 53%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(
      180deg,
      transparent 0 48%,
      rgba(1, 4, 8, 0.22) 57%,
      rgba(1, 4, 8, 0.82) 69%,
      #010307 78%,
      #010307 100%
    );
  box-shadow:
    inset 0 0 46px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(250, 188, 82, 0.16);
}

.inventory-player-loadout-grid {
  display: grid;
  aspect-ratio: 1 / 1;
  grid-template-columns: minmax(58px, 0.72fr) minmax(112px, 1.4fr) minmax(58px, 0.72fr);
  grid-template-rows: repeat(5, minmax(68px, 1fr));
  gap: 5px 3px;
  align-items: center;
  justify-items: center;
  width: 100%;
}

.inventory-player-hero-stage {
  grid-area: hero;
  align-self: stretch;
  width: 100%;
  min-height: 356px;
  pointer-events: none;
}

.inventory-player-loadout-grid > :not(.inventory-player-hero-stage):not(.t2-wing-character-stage) {
  position: relative;
  z-index: 5;
}

.inventory-player-panel--hero-showcase .inventory-player-loadout-grid > :not(.inventory-player-hero-stage):not(.t2-wing-character-stage) {
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.82));
}

.t2-wing-character-stage {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  user-select: none;
  background:
    radial-gradient(circle at 50% 37%, rgba(122, 150, 190, 0.13), transparent 43%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.34), transparent 20% 80%, rgba(0, 0, 0, 0.34));
}

.t2-wing-character-stage--inventory {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  align-self: stretch;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 356px;
  overflow: visible;
  pointer-events: none;
  background: transparent;
}

.t2-wing-character-stage--studio {
  width: min(100%, 540px);
  min-height: 520px;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(213, 170, 85, 0.36);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 39%, rgba(84, 133, 178, 0.23), transparent 33%),
    radial-gradient(circle at 50% 70%, rgba(198, 139, 55, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(5, 16, 29, 0.98), rgba(2, 7, 13, 0.99));
  box-shadow:
    inset 0 0 70px rgba(0, 0, 0, 0.72),
    0 24px 70px rgba(0, 0, 0, 0.48);
}

.t2-wing-character-background {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  pointer-events: none;
}

.t2-wing-character-background-fade {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(1, 4, 8, 0.04) 0%,
      rgba(1, 4, 8, 0.06) 56%,
      rgba(1, 4, 8, 0.58) 82%,
      #010307 100%
    ),
    linear-gradient(
      90deg,
      rgba(1, 4, 8, 0.48),
      transparent 18% 82%,
      rgba(1, 4, 8, 0.48)
    );
}

.t2-wing-character-aura {
  position: absolute;
  z-index: 1;
  inset: 14% 10% 5%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(193, 224, 255, 0.12), transparent 48%),
    radial-gradient(ellipse at 50% 75%, rgba(224, 160, 61, 0.1), transparent 50%);
  filter: blur(10px);
}

.t2-wing-character-art {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 2%;
  width: 80%;
  height: 96%;
  object-fit: contain;
  object-position: 50% 100%;
  transform: translateX(-50%);
  pointer-events: none;
  filter:
    drop-shadow(0 0 1px rgba(232, 184, 87, 0.84))
    drop-shadow(0 8px 12px rgba(0, 0, 0, 0.96))
    saturate(1.04);
}

.t2-wing-character-art--avatar {
  top: 2%;
  width: 80%;
  height: 96%;
  border-radius: 0;
  object-fit: contain;
  object-position: 50% 100%;
  box-shadow: none;
}

.t2-wing-character-stage--studio .t2-wing-character-art {
  width: 80%;
  object-position: 50% 100%;
}

.t2-wing-layer {
  position: absolute;
  z-index: 3;
  width: 58%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  transform-origin: center;
  pointer-events: none;
  filter:
    drop-shadow(0 0 8px rgba(123, 182, 255, 0.35))
    drop-shadow(0 0 22px rgba(83, 104, 209, 0.25));
}

.t2-wing-character-stage--studio .t2-wing-layer {
  width: 58%;
}

.t2-wing-layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.t2-wing-layer--interactive {
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  outline: none;
}

.t2-wing-layer--interactive:active {
  cursor: grabbing;
}

.t2-wing-layer--interactive:focus-visible {
  border-radius: 50%;
  box-shadow: 0 0 0 2px #e5b958, 0 0 0 5px rgba(229, 185, 88, 0.2);
}

.t2-wing-effect-layer {
  position: absolute;
  z-index: 2;
  inset: 4%;
  overflow: hidden;
  pointer-events: none;
}

.t2-wing-effect-layer i {
  position: absolute;
  left: var(--effect-x);
  top: var(--effect-y);
  display: block;
  opacity: 0;
  transform: translate(-50%, -50%) scale(var(--effect-scale));
  animation-delay: var(--effect-delay);
  animation-duration: var(--effect-duration);
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.t2-wing-effect-layer--celestial_sparkles i {
  width: 6px;
  height: 6px;
  background: #eaf7ff;
  box-shadow: 0 0 6px #7fd7ff, 0 0 15px #6887ff;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation-name: t2-effect-twinkle;
}

.t2-wing-effect-layer--ember_rain i,
.t2-wing-effect-layer--shadow_cinders i {
  width: 5px;
  height: 11px;
  border-radius: 50% 50% 45% 45%;
  background: #ffb234;
  box-shadow: 0 0 7px #ff5b12, 0 0 14px rgba(255, 62, 12, 0.82);
  animation-name: t2-effect-rise;
}

.t2-wing-effect-layer--winter_snow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(244, 252, 255, 0.96);
  box-shadow: 0 0 7px rgba(118, 207, 255, 0.92);
  animation-name: t2-effect-fall;
}

.t2-wing-effect-layer--glacial_shards i {
  width: 5px;
  height: 17px;
  border: 1px solid rgba(220, 249, 255, 0.92);
  background: linear-gradient(180deg, #ecffff, #53bfff 60%, #3975dc);
  box-shadow: 0 0 9px rgba(75, 191, 255, 0.9);
  clip-path: polygon(50% 0, 100% 30%, 68% 100%, 16% 82%, 0 29%);
  animation-name: t2-effect-shard-fall;
}

.t2-wing-effect-layer--storm_sparks i {
  width: 14px;
  height: 4px;
  background: #d9f5ff;
  box-shadow: 0 0 6px #5bc7ff, 0 0 16px #5b75ff;
  clip-path: polygon(0 35%, 43% 35%, 55% 0, 100% 65%, 56% 65%, 45% 100%);
  animation-name: t2-effect-storm-flash;
}

.t2-wing-effect-layer--void_motes i {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(216, 120, 255, 0.75);
  border-radius: 50%;
  background: radial-gradient(circle, #f0b9ff 0 12%, #8a43d6 36%, rgba(30, 3, 72, 0.1) 72%);
  box-shadow: 0 0 11px #8f43ff, 0 0 22px rgba(91, 28, 182, 0.65);
  animation-name: t2-effect-float;
}

.t2-wing-effect-layer--verdant_wisps i {
  width: 7px;
  height: 16px;
  border-radius: 70% 35% 65% 35%;
  background: linear-gradient(180deg, #d9ffad, #4dff94 45%, rgba(13, 117, 66, 0.1));
  box-shadow: 0 0 9px #4cff9c, 0 0 20px rgba(37, 226, 126, 0.56);
  animation-name: t2-effect-wisp;
}

.t2-wing-effect-layer--golden_radiance {
  background: repeating-conic-gradient(
    from 0deg at 50% 55%,
    rgba(255, 217, 116, 0.1) 0deg 3deg,
    transparent 3deg 20deg
  );
  animation: t2-effect-radiance 8s linear infinite;
}

.t2-wing-effect-layer--golden_radiance i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff4b0;
  box-shadow: 0 0 8px #ffcd51, 0 0 18px rgba(255, 187, 41, 0.76);
  animation-name: t2-effect-twinkle;
}

.t2-wing-effect-layer--shadow_cinders i {
  background: #a561d2;
  box-shadow: 0 0 7px #542079, 0 0 16px rgba(14, 0, 25, 0.96);
}

.t2-wing-effect-layer--bloodmoon_petals i {
  width: 8px;
  height: 15px;
  border-radius: 80% 15% 70% 25%;
  background: linear-gradient(145deg, #ff6f72, #9f132a 70%, #3d020d);
  box-shadow: 0 0 7px rgba(219, 38, 67, 0.82);
  animation-name: t2-effect-petal-fall;
}

.t2-wing-layer--fire,
.t2-wing-thumb--fire,
.t2-wing-market-card--fire {
  --wing-glow: 255, 91, 26;
}

.t2-wing-layer--frost,
.t2-wing-thumb--frost,
.t2-wing-market-card--frost {
  --wing-glow: 82, 207, 255;
}

.t2-wing-layer--storm,
.t2-wing-thumb--storm,
.t2-wing-market-card--storm {
  --wing-glow: 107, 130, 255;
}

.t2-wing-layer--umbral,
.t2-wing-thumb--umbral,
.t2-wing-market-card--umbral {
  --wing-glow: 176, 74, 255;
}

.t2-wing-layer--nature,
.t2-wing-thumb--nature,
.t2-wing-market-card--nature {
  --wing-glow: 80, 220, 137;
}

.t2-wing-layer--dawn,
.t2-wing-thumb--dawn,
.t2-wing-market-card--dawn {
  --wing-glow: 255, 203, 97;
}

.t2-wing-layer--moonsea,
.t2-wing-thumb--moonsea,
.t2-wing-market-card--moonsea {
  --wing-glow: 93, 185, 255;
}

.t2-wing-layer--eclipse,
.t2-wing-thumb--eclipse,
.t2-wing-market-card--eclipse {
  --wing-glow: 255, 127, 69;
}

.t2-wing-layer--astral,
.t2-wing-thumb--astral,
.t2-wing-market-card--astral {
  --wing-glow: 125, 103, 255;
}

.t2-wing-layer--vespera,
.t2-wing-thumb--vespera,
.t2-wing-market-card--vespera {
  --wing-glow: 237, 174, 255;
}

.t2-wing-layer {
  filter:
    drop-shadow(0 0 8px rgba(var(--wing-glow, 123, 182, 255), 0.52))
    drop-shadow(0 0 24px rgba(var(--wing-glow, 83, 104, 209), 0.29));
  animation: t2-wing-breathe 3.8s ease-in-out infinite;
}

.inventory-player-appearance-tools__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 6px;
}

.inventory-player-appearance-tool {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.inventory-player-appearance-tool__label {
  font-family: var(--font-serif, serif);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c7bfd1;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

.inventory-player-appearance-tool__medallion {
  width: 58px;
  height: 58px;
}

.inventory-player-appearance-tool__medallion--wings {
  border-color: rgba(225, 181, 89, 0.44);
  background:
    radial-gradient(circle, rgba(61, 93, 146, 0.36), rgba(2, 8, 15, 0.92) 70%);
  box-shadow:
    inset 0 0 15px rgba(72, 122, 190, 0.22),
    0 0 15px rgba(225, 181, 89, 0.09);
}

.inventory-player-appearance-tool__medallion--wings img {
  filter: drop-shadow(0 0 5px rgba(123, 184, 255, 0.45));
  transform: scale(1.12);
}

.inventory-player-appearance-tool__wing-glyph {
  color: #e5bb65;
  font-size: 24px;
  text-shadow: 0 0 12px rgba(127, 182, 255, 0.65);
}

.inventory-player-appearance-tool__value {
  display: block;
  max-width: 125px;
  overflow: hidden;
  font-family: var(--font-ui, sans-serif);
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(225, 211, 188, 0.72);
}

.t2-wing-studio-backdrop {
  position: fixed;
  z-index: 2147483200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: rgba(0, 3, 8, 0.84);
  backdrop-filter: blur(8px);
  isolation: isolate;
}

.t2-wing-studio {
  display: flex;
  width: min(1120px, 100%);
  max-height: min(880px, 100%);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(220, 174, 83, 0.52);
  border-radius: 12px;
  background:
    radial-gradient(circle at 20% 0, rgba(70, 113, 167, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(7, 20, 34, 0.99), rgba(2, 8, 15, 0.995));
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.82),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  font-size: 14px;
}

.t2-wing-studio__header,
.t2-wing-market__header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(221, 174, 81, 0.23);
  background: linear-gradient(90deg, rgba(28, 55, 80, 0.34), transparent);
}

.t2-wing-studio__header h2,
.t2-wing-market__header h3 {
  margin: 3px 0 4px;
  font-family: var(--font-serif, serif);
  font-size: clamp(21px, 2vw, 31px);
  line-height: 1;
  color: #f2e7cf;
}

.t2-wing-studio__header p,
.t2-wing-market__header p {
  max-width: 720px;
  margin: 0;
  color: rgba(214, 219, 228, 0.72);
  font-size: 14px;
  line-height: 1.5;
}

.t2-wing-studio__gold {
  display: inline-flex;
  margin-top: 8px;
  color: #edc66f;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.t2-wing-kicker {
  display: block;
  color: #dbad55;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.t2-wing-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(221, 174, 81, 0.32);
  border-radius: 6px;
  color: #e9ddc5;
  background: rgba(0, 0, 0, 0.34);
  font-size: 23px;
  line-height: 1;
}

.t2-wing-close:hover {
  border-color: rgba(239, 197, 110, 0.8);
  background: rgba(85, 49, 18, 0.45);
}

.t2-wing-studio__body {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 14px;
  padding: 14px;
  overflow: hidden;
}

.t2-wing-studio__preview {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

.t2-wing-preview-caption {
  display: flex;
  width: min(100%, 540px);
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(213, 170, 85, 0.26);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: rgba(2, 8, 14, 0.94);
}

.t2-wing-preview-caption strong {
  color: #f1dfbd;
  font-family: var(--font-serif, serif);
  font-size: 18px;
}

.t2-wing-preview-caption em {
  color: #d7aa52;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.t2-wing-size-control {
  display: grid;
  grid-template-columns: auto minmax(110px, 1fr) 46px;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  padding-top: 8px;
  border-top: 1px solid rgba(213, 170, 85, 0.18);
}

.t2-wing-size-control__label {
  color: #e7d7b7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.t2-wing-size-control input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border: 1px solid rgba(216, 169, 78, 0.46);
  border-radius: 999px;
  outline: none;
  background: linear-gradient(
    90deg,
    #d8a94e 0 var(--t2-wing-size-fill, 0%),
    rgba(219, 225, 232, 0.34) var(--t2-wing-size-fill, 0%) 100%
  );
  cursor: pointer;
}

.t2-wing-size-control input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid #ffe5a0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c5, #e0a840 48%, #7b4814 100%);
  box-shadow:
    0 0 0 3px rgba(216, 169, 78, 0.18),
    0 0 12px rgba(240, 188, 74, 0.78);
  cursor: grab;
}

.t2-wing-size-control input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #ffe5a0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c5, #e0a840 48%, #7b4814 100%);
  box-shadow:
    0 0 0 3px rgba(216, 169, 78, 0.18),
    0 0 12px rgba(240, 188, 74, 0.78);
  cursor: grab;
}

.t2-wing-size-control input:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.08);
}

.t2-wing-size-control input:active::-moz-range-thumb {
  cursor: grabbing;
}

.t2-wing-size-control input:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 225, 151, 0.78);
}

.t2-wing-size-control input:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.t2-wing-size-control output {
  color: #edc66f;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.t2-wing-preview-actions {
  display: flex;
  width: min(100%, 540px);
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}

.t2-wing-secondary-action,
.t2-wing-primary-action,
.t2-wing-market-action {
  min-height: 34px;
  border: 1px solid rgba(217, 172, 84, 0.36);
  border-radius: 5px;
  padding: 7px 12px;
  color: #eadfc9;
  background: linear-gradient(180deg, rgba(68, 47, 21, 0.66), rgba(20, 20, 22, 0.8));
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.t2-wing-secondary-action:disabled,
.t2-wing-primary-action:disabled,
.t2-wing-market-action:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.t2-wing-primary-action {
  min-height: 34px;
  border: 1px solid rgba(247, 201, 104, 0.78);
  border-radius: 5px;
  padding: 7px 14px;
  color: #140c03;
  background: linear-gradient(180deg, #f0c76e, #b77a27);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 0 18px rgba(230, 172, 63, 0.22);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.t2-wing-primary-action:disabled {
  cursor: not-allowed;
  filter: saturate(0.3);
  opacity: 0.5;
}

.t2-wing-collection-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(213, 170, 85, 0.2);
  border-radius: 8px;
  background: rgba(2, 8, 14, 0.54);
}

.t2-wing-collection-heading {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(213, 170, 85, 0.18);
}

.t2-wing-collection-heading span {
  color: rgba(212, 217, 228, 0.66);
  font-size: 12px;
  line-height: 1.4;
}

.t2-wing-collection-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.t2-wing-collection-tabs button {
  min-height: 36px;
  border: 1px solid rgba(143, 163, 186, 0.22);
  border-radius: 5px;
  padding: 7px 14px;
  color: rgba(220, 225, 234, 0.72);
  background: rgba(4, 12, 21, 0.78);
  font-family: var(--font-serif, serif);
  font-size: 15px;
  font-weight: 700;
}

.t2-wing-collection-tabs button:hover,
.t2-wing-collection-tabs button.is-active {
  border-color: rgba(235, 190, 98, 0.68);
  color: #f3dfb7;
  background: linear-gradient(180deg, rgba(75, 52, 22, 0.74), rgba(18, 17, 19, 0.86));
  box-shadow: inset 0 0 0 1px rgba(242, 198, 107, 0.14);
}

.t2-wing-collection {
  display: grid;
  min-height: 0;
  align-content: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow-y: auto;
  padding: 8px;
}

.t2-wing-collection-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(143, 163, 186, 0.2);
  border-radius: 7px;
  padding: 6px;
  text-align: left;
  background: linear-gradient(145deg, rgba(9, 24, 39, 0.92), rgba(3, 9, 16, 0.96));
}

.t2-wing-collection-empty {
  grid-column: 1 / -1;
  align-self: start;
  margin: 8px;
  padding: 18px 14px;
  border: 1px dashed rgba(213, 170, 85, 0.32);
  border-radius: 7px;
  background: rgba(4, 10, 18, 0.68);
  color: rgba(224, 214, 194, 0.72);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.t2-wing-collection-card:hover,
.t2-wing-collection-card.is-preview {
  border-color: rgba(224, 178, 86, 0.64);
  transform: translateY(-1px);
}

.t2-wing-collection-card.is-active {
  box-shadow: inset 0 0 0 1px rgba(242, 198, 107, 0.5), 0 0 20px rgba(214, 162, 68, 0.12);
}

.t2-wing-collection-card.is-locked {
  filter: saturate(0.46);
}

.t2-wing-thumb {
  display: grid;
  height: 70px;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  background: radial-gradient(circle, rgba(var(--wing-glow), 0.16), rgba(0, 0, 0, 0.72));
}

.t2-wing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(var(--wing-glow), 0.6));
}

.t2-wing-collection-card__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.t2-wing-collection-card__copy strong {
  overflow: hidden;
  color: #eadfc9;
  font-family: var(--font-serif, serif);
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.t2-wing-collection-card__copy small {
  color: #c89e51;
  font-size: 11px;
  line-height: 1.3;
}

.t2-wing-effect-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 82px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  align-items: center;
  gap: 0 9px;
  border: 1px solid rgba(143, 163, 186, 0.2);
  border-radius: 7px;
  padding: 6px;
  text-align: left;
  background: linear-gradient(145deg, rgba(9, 24, 39, 0.92), rgba(3, 9, 16, 0.96));
}

.t2-wing-effect-card:hover,
.t2-wing-effect-card.is-preview {
  border-color: rgba(224, 178, 86, 0.64);
  transform: translateY(-1px);
}

.t2-wing-effect-card.is-active {
  box-shadow: inset 0 0 0 1px rgba(242, 198, 107, 0.5), 0 0 20px rgba(214, 162, 68, 0.12);
}

.t2-wing-effect-swatch {
  position: relative;
  grid-row: 1 / -1;
  width: 82px;
  height: 70px;
  overflow: hidden;
  border-radius: 5px;
  background:
    radial-gradient(circle at 50% 50%, rgba(86, 116, 153, 0.2), transparent 55%),
    #020812;
}

.t2-wing-effect-swatch .t2-wing-effect-layer {
  inset: 0;
}

.t2-wing-effect-card strong {
  align-self: end;
  overflow: hidden;
  color: #eadfc9;
  font-family: var(--font-serif, serif);
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.t2-wing-effect-card small {
  align-self: start;
  margin-top: 4px;
  color: #c89e51;
  font-size: 11px;
}

.t2-wing-market {
  min-height: 0;
  overflow-y: auto;
}

.t2-wing-market__gold {
  flex: 0 0 auto;
  color: #ecc76f;
  font-family: var(--font-mono, monospace);
  font-size: 18px;
}

.t2-wing-market__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.t2-wing-market-card {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(150px, 0.88fr) minmax(170px, 1.12fr);
  overflow: hidden;
  border: 1px solid rgba(138, 164, 193, 0.25);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 30%, rgba(var(--wing-glow), 0.1), transparent 42%),
    linear-gradient(145deg, rgba(8, 23, 38, 0.97), rgba(3, 9, 16, 0.99));
}

.t2-wing-market-card.is-active {
  border-color: rgba(231, 188, 96, 0.72);
  box-shadow: inset 0 0 0 1px rgba(231, 188, 96, 0.22);
}

.t2-wing-market-card__art {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  background: radial-gradient(circle, rgba(var(--wing-glow), 0.16), rgba(0, 0, 0, 0.68) 72%);
}

.t2-wing-market-card__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(var(--wing-glow), 0.62));
  transition: transform 180ms ease;
}

.t2-wing-market-card:hover .t2-wing-market-card__art img {
  transform: scale(1.045);
}

.t2-wing-market-card__source {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  padding: 5px 7px;
  border: 1px solid rgba(230, 188, 100, 0.3);
  border-radius: 4px;
  color: #edca7d;
  background: rgba(0, 4, 10, 0.82);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.t2-wing-market-card__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
}

.t2-wing-market-card__copy h4 {
  margin: 0;
  color: #f0e1c5;
  font-family: var(--font-serif, serif);
  font-size: 16px;
}

.t2-wing-market-action {
  width: 100%;
}

@keyframes t2-effect-twinkle {
  0%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
  }
  45%, 60% {
    opacity: 0.96;
    transform: translate(-50%, -50%) scale(var(--effect-scale)) rotate(45deg);
  }
}

@keyframes t2-effect-rise {
  0% {
    opacity: 0;
    transform: translate(-50%, 36px) scale(var(--effect-scale));
  }
  20% {
    opacity: 0.94;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--effect-drift)), -110px) scale(0.25);
  }
}

@keyframes t2-effect-fall {
  0% {
    opacity: 0;
    transform: translate(-50%, -70px) scale(var(--effect-scale));
  }
  18%, 82% {
    opacity: 0.92;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--effect-drift)), 130px) scale(var(--effect-scale));
  }
}

@keyframes t2-effect-shard-fall {
  0% {
    opacity: 0;
    transform: translate(-50%, -70px) rotate(-25deg) scale(var(--effect-scale));
  }
  25%, 78% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--effect-drift)), 120px) rotate(165deg) scale(0.42);
  }
}

@keyframes t2-effect-storm-flash {
  0%, 12%, 18%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(-18deg);
  }
  13%, 16% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(var(--effect-scale)) rotate(12deg);
  }
}

@keyframes t2-effect-float {
  0%, 100% {
    opacity: 0.2;
    transform: translate(-50%, 12px) scale(0.5);
  }
  50% {
    opacity: 0.95;
    transform: translate(calc(-50% + var(--effect-drift)), -22px) scale(var(--effect-scale));
  }
}

@keyframes t2-effect-wisp {
  0%, 100% {
    opacity: 0.12;
    transform: translate(-50%, 18px) rotate(-20deg) scale(0.42);
  }
  50% {
    opacity: 0.9;
    transform: translate(calc(-50% + var(--effect-drift)), -28px) rotate(22deg) scale(var(--effect-scale));
  }
}

@keyframes t2-effect-radiance {
  to {
    transform: rotate(360deg);
  }
}

@keyframes t2-effect-petal-fall {
  0% {
    opacity: 0;
    transform: translate(-50%, -70px) rotate(0deg) scale(var(--effect-scale));
  }
  20%, 82% {
    opacity: 0.88;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--effect-drift)), 130px) rotate(310deg) scale(0.55);
  }
}

@keyframes t2-wing-breathe {
  0%, 100% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
    filter:
      drop-shadow(0 0 11px rgba(var(--wing-glow, 123, 182, 255), 0.62))
      drop-shadow(0 0 30px rgba(var(--wing-glow, 83, 104, 209), 0.36));
  }
}

.inventory-bonus-panel--embedded {
  flex: 0 0 auto;
  height: auto !important;
  border-color: rgba(200, 165, 114, 0.34) !important;
  background:
    linear-gradient(180deg, rgba(7, 18, 18, 0.94), rgba(2, 12, 10, 0.96)) !important;
}

.inventory-bonus-panel__list--embedded {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.inventory-bonus-panel__list--embedded > * {
  grid-column: span 2;
  min-width: 0;
  margin-top: 0 !important;
}

.inventory-bonus-panel__list--embedded > :only-child {
  grid-column: 1 / -1;
}

@media (max-width: 1260px) {
  .inventory-player-loadout-grid {
    grid-template-columns: minmax(58px, 0.7fr) minmax(92px, 1.1fr) minmax(58px, 0.7fr);
  }

  .inventory-player-hero-stage,
  .t2-wing-character-stage--inventory {
    min-height: 344px;
  }

  .t2-wing-studio__body {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  }

  .t2-wing-collection {
    grid-template-columns: minmax(0, 1fr);
  }

  .t2-wing-market__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .inventory-player-loadout-grid {
    grid-template-columns: minmax(62px, 0.72fr) minmax(122px, 1.35fr) minmax(62px, 0.72fr);
  }

  .t2-wing-studio__body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .t2-wing-studio__preview,
  .t2-wing-collection {
    overflow: visible;
  }

  .t2-wing-character-stage--studio {
    min-height: 460px;
  }

  .t2-wing-collection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .t2-wing-collection-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .t2-wing-collection-card__copy {
    text-align: center;
  }

  .t2-wing-market-card {
    grid-template-columns: minmax(120px, 0.75fr) minmax(155px, 1.25fr);
  }
}

@media (max-width: 480px) {
  .t2-wing-studio__header,
  .t2-wing-market__header {
    padding: 13px;
  }

  .t2-wing-studio__body,
  .t2-wing-market__grid {
    padding: 8px;
  }

  .t2-wing-character-stage--studio {
    min-height: 410px;
  }

  .t2-wing-market-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .t2-wing-market-card__art {
    min-height: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .t2-wing-layer,
  .t2-wing-effect-layer,
  .t2-wing-effect-layer i {
    animation: none;
  }

  .t2-wing-collection-card,
  .t2-wing-market-card__art img {
    transition: none;
  }
}

/* Integrated 50-point subclass tree (Talents2 v5 only). */
.talent-subclass-focus__tree {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto !important;
  overflow-y: visible;
  contain: inline-size;
  touch-action: pan-y;
  scrollbar-gutter: stable;
}

@media (min-width: 1050px) {
  .talent-subclass-focus-layout {
    overflow: visible !important;
  }

  .talent-subclass-focus-layout > .combat-talent-loadout-toolbar {
    position: absolute !important;
    z-index: 40 !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: start !important;
    top: 300px !important;
    right: auto !important;
    left: 18px !important;
    width: 190px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .talent-subclass-focus-layout
    > .combat-talent-loadout-toolbar
    .mastery-loadout-title-row {
    height: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .talent-subclass-focus-layout
    > .combat-talent-loadout-toolbar
    .mastery-loadout-label {
    font-size: 10px;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }

  .talent-subclass-focus-layout
    > .combat-talent-loadout-toolbar
    .mastery-loadout-presets {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .talent-subclass-focus-layout
    > .combat-talent-loadout-toolbar
    .mastery-loadout-card {
    height: 44px;
  }

  .talent-subclass-focus-layout
    > .combat-talent-loadout-toolbar
    .mastery-loadout-note {
    display: none;
  }
}

.talent-node-v2__face.talent-node-v2--milestone {
  border-radius: 0 !important;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  border-color: #d9b881 !important;
  box-shadow:
    0 0 0 2px rgba(217, 184, 129, 0.22),
    0 0 18px rgba(217, 184, 129, 0.4) !important;
}

.talent-popover-v2__content--milestone,
.talent-popover-v2__content--keystone {
  gap: 8px;
  padding: 11px;
}

.talent-popover-v2 {
  overscroll-behavior: contain;
  scrollbar-color: rgb(var(--brass-rgb) / 0.78) rgb(var(--indigo-rgb) / 0.48);
  scrollbar-width: thin;
}

.talent-popover-v2__content--milestone .talent-popover-v2__top,
.talent-popover-v2__content--keystone .talent-popover-v2__top {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  margin: -11px -11px 0;
  padding: 10px 14px 10px 17px;
}

.talent-popover-v2__content--milestone .talent-popover-v2__icon,
.talent-popover-v2__content--keystone .talent-popover-v2__icon {
  width: 42px;
  height: 42px;
}

.talent-popover-v2__content--milestone .talent-popover-v2__summary,
.talent-popover-v2__content--keystone .talent-popover-v2__summary {
  display: none;
}

.talent-popover-v2__content--milestone .talent-popover-v2__bonus,
.talent-popover-v2__content--keystone .talent-popover-v2__bonus {
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 6px 8px;
}

.talent-popover-v2__content--milestone .talent-popover-v2__footer,
.talent-popover-v2__content--keystone .talent-popover-v2__footer {
  margin: 0 -11px -11px;
  padding: 7px 11px;
}

.talents2-mechanic-contract {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
}

.talents2-mechanic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  grid-column: 1 / -1;
}

.talents2-mechanic-tags > span {
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--talent-accent) 50%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--talent-accent) 10%, rgba(4, 9, 18, 0.92));
  color: #e9ddc3;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.talents2-mechanic-row {
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 5px;
  background: rgba(5, 12, 23, 0.62);
  font-size: 12px;
  line-height: 1.32;
}

.talents2-mechanic-row--primary {
  grid-column: 1 / -1;
  border-color: color-mix(in srgb, var(--talent-accent) 28%, transparent);
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--talent-accent) 10%, transparent),
      rgba(5, 12, 23, 0.66)
    );
}

.talents2-mechanic-row--fact {
  grid-column: span 4;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 3px;
}

.talents2-mechanic-row--link {
  grid-column: span 6;
}

.talents2-mechanic-row > strong {
  color: #d9b881;
  font-family: var(--font-ui, sans-serif);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.talents2-mechanic-row > span {
  min-width: 0;
  color: #e2dace;
  overflow-wrap: anywhere;
}

.talents2-rank-evolution {
  display: grid;
  gap: 4px;
  margin-top: 3px;
  padding: 7px;
  border: 1px solid rgba(126, 155, 183, 0.18);
  border-radius: 5px;
  background: rgba(6, 16, 30, 0.58);
}

.talents2-keystone-requirements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
  grid-column: 1 / -1;
  padding: 8px;
  border: 1px solid rgba(241, 201, 109, 0.28);
  border-radius: 5px;
  background: rgba(70, 48, 18, 0.22);
  color: #c6bca8;
  font-size: 10px;
}

.talent-node-v2__label {
  width: 118px !important;
}

.talent-node-v2__label > span {
  display: -webkit-box;
  max-width: 118px;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(3, 8, 16, 0.78);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 13px !important;
  line-height: 1.2 !important;
  text-wrap: balance;
}

.talents2-mobile-popover {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.talents2-mobile-popover > .talent-popover-v2__content {
  grid-column: 1 / -1;
}

.talents2-mobile-popover > button {
  min-width: 0;
  margin-top: 0 !important;
  padding: 8px 6px !important;
  font-size: 11px !important;
  line-height: 1.15;
}

.talents2-keystone-requirements > strong {
  grid-column: 1 / -1;
  color: #f1c96d;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.talents2-keystone-requirements > span.is-satisfied {
  color: #8ce5b1;
}

.talents2-rank-evolution > div {
  display: grid;
  grid-template-columns: minmax(84px, 0.34fr) minmax(0, 1fr);
  gap: 7px;
  color: #817b8d;
  font-size: 9px;
  line-height: 1.35;
}

.talents2-rank-evolution > div.is-earned {
  color: #8fc9a3;
}

.talents2-rank-evolution > div.is-next {
  color: #e8d6ac;
}

.talents2-rank-evolution strong {
  color: inherit;
}

.talent-node-v2__face.talents2-prerequisite-candidate {
  z-index: 3;
  border-color: #f1c96d !important;
  box-shadow:
    0 0 0 2px rgba(241, 201, 109, 0.2),
    0 0 22px rgba(241, 201, 109, 0.72) !important;
  animation: talents2-prerequisite-pulse 1.1s ease-in-out infinite alternate;
}

.talent-node-v2__face.talents2-prerequisite-satisfied {
  border-color: #8ce5b1 !important;
  box-shadow:
    0 0 0 2px rgba(140, 229, 177, 0.2),
    0 0 24px rgba(140, 229, 177, 0.76) !important;
}

.talent-node-v2__face.talents2-keystone-incompatible {
  opacity: 0.48;
  filter: grayscale(0.72) saturate(0.42);
}

.talent-node-v2__face.talents2-keystone-incompatible:hover,
.talent-node-v2__face.talents2-keystone-incompatible:focus-visible {
  opacity: 0.82;
}

.talent-node-v2__face:focus-visible {
  outline: 2px solid #f3d78e;
  outline-offset: 4px;
}

@keyframes talents2-prerequisite-pulse {
  from {
    filter: brightness(1);
  }

  to {
    filter: brightness(1.24);
  }
}

@media (max-width: 929px) {
  .talent-subclass-focus-layout {
    display: block !important;
  }

  .talent-subclass-focus-layout > .talent-subclass-focus__header {
    display: block !important;
    padding: 12px !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__header-inner,
  .talent-subclass-focus-layout .talent-subclass-focus__sidebar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__identity,
  .talent-subclass-focus-layout .talent-subclass-focus__sidebar {
    position: relative !important;
    grid-column: 1 !important;
    grid-row: auto !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__identity,
  .talent-subclass-focus-layout .talent-subclass-focus__bonuses,
  .talent-subclass-focus-layout .talent-subclass-focus__points,
  .talent-subclass-focus-layout .talent-subclass-focus__tree {
    width: 100% !important;
    min-width: 0 !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__identity p {
    max-width: none !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__tree {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

@media (max-width: 640px) {
  .talents2-mechanic-row--primary,
  .talents2-mechanic-row--fact,
  .talents2-mechanic-row--link {
    grid-column: 1 / -1;
  }

  .talents2-mechanic-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .talents2-keystone-requirements {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container talent-page (max-width: 1020px) {
  .talent-subclass-focus-layout {
    display: block !important;
  }

  .talent-subclass-focus-layout > .talent-subclass-focus__header {
    display: block !important;
    padding: 12px !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__header-inner,
  .talent-subclass-focus-layout .talent-subclass-focus__sidebar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__identity,
  .talent-subclass-focus-layout .talent-subclass-focus__sidebar {
    position: relative !important;
    grid-column: 1 !important;
    grid-row: auto !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__identity,
  .talent-subclass-focus-layout .talent-subclass-focus__bonuses,
  .talent-subclass-focus-layout .talent-subclass-focus__points,
  .talent-subclass-focus-layout .talent-subclass-focus__tree {
    width: 100% !important;
    min-width: 0 !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__identity p {
    max-width: none !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__tree {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

@media (max-width: 560px) {
  .talents2-mechanic-row,
  .talents2-rank-evolution > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .talent-node-v2__face.talents2-prerequisite-candidate {
    animation: none;
  }

  .talent-node-v2__face,
  .talent-node-v2__face * {
    transition: none !important;
  }
}

/* Keep subclass controls visible above a readable, contained bonus ledger. */
.talent-subclass-focus-layout .talent-subclass-focus__points {
  order: -2;
}

.talent-subclass-focus-layout .talent-subclass-focus__bonuses {
  order: -1;
}

.talent-subclass-focus-layout .talent-subclass-bonus-help {
  align-items: flex-start !important;
  flex-direction: column;
  gap: 4px !important;
}

.talent-subclass-focus-layout .talent-subclass-bonus-help__label {
  width: 100%;
  align-items: flex-start !important;
}

.talent-subclass-focus-layout .talent-subclass-bonus-help__label .truncate {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.talent-subclass-focus-layout .talent-subclass-bonus-help > .font-mono {
  width: 100%;
  text-align: left;
}

@container talent-page (min-width: 930px) {
  .talent-subclass-focus-layout .talent-subclass-focus__sidebar {
    min-height: 0;
    overflow: hidden;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__bonuses {
    display: flex;
    min-height: 0;
    flex: 1 1 auto !important;
    flex-direction: column;
    overflow: hidden;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__bonuses > div:last-child {
    min-height: 0;
    padding-right: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgb(var(--brass-rgb) / 0.72) rgb(var(--indigo-rgb) / 0.42);
    scrollbar-width: thin;
  }
}

/* Keystone identity and its permanent stat reward must read at a glance. */
.talent-popover-v2__content--keystone
  .talent-popover-v2__bonus--next
  .talent-popover-v2__value {
  color: rgb(245 198 88) !important;
  font-weight: 900 !important;
  text-shadow: 0 0 12px rgb(245 198 88 / 0.28);
}

.talent-node-v2__face.talents2-keystone-locked::after {
  content: "\1F512";
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgb(241 201 109 / 0.75);
  border-radius: 999px;
  background: rgb(9 18 33 / 0.96);
  box-shadow: 0 0 12px rgb(241 201 109 / 0.25);
  color: rgb(241 201 109);
  font-size: 11px;
  line-height: 1;
  z-index: 4;
}
