.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;
}

.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;
}

@media (min-width: 901px) {
  .t2-picker {
    min-height: 0;
    overflow: hidden;
  }

  .t2-picker__frame {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 8px;
    height: 100dvh;
    min-height: 0;
    padding: 8px 0 10px;
    overflow: hidden;
  }

  .t2-picker__frame .t2-picker__header {
    min-height: 72px;
  }

  .t2-picker__frame.is-overview .t2-overview-grid {
    min-height: 0;
    margin-top: 0;
  }

  .t2-picker__frame.is-overview .t2-overview-card {
    min-height: 0;
  }

  .t2-picker__frame.is-overview .t2-overview-card__main {
    grid-template-rows: clamp(250px, calc(100dvh - 470px), 430px) minmax(0, 1fr);
    min-height: 0;
  }

  .t2-picker__frame.is-detail .t2-dossier {
    height: 100%;
    min-height: 0;
  }

  .t2-picker__frame.is-detail .t2-dossier__hero {
    min-height: 0;
  }

  .t2-picker__frame.is-detail .t2-dossier__hero > img {
    position: absolute;
    inset: 0;
    min-height: 0;
  }

  .t2-picker__frame.is-detail .t2-dossier__content {
    min-height: 0;
    padding: 14px 18px;
    overflow: hidden;
  }

  .t2-picker__frame.is-detail .t2-presentation {
    padding-bottom: 9px;
  }

  .t2-picker__frame.is-detail .t2-dossier__description {
    margin: 9px 0;
    font-size: 0.82rem;
    line-height: 1.36;
  }

  .t2-picker__frame.is-detail .t2-mechanic-card {
    min-height: 72px;
    padding: 8px 10px;
  }

  .t2-picker__frame.is-detail .t2-resource {
    margin-top: 6px;
    padding: 8px 10px;
  }

  .t2-picker__frame.is-detail .t2-section-heading {
    margin: 8px 0 6px;
  }

  .t2-picker__frame.is-detail .t2-subclass-card,
  .t2-picker__frame.is-detail .t2-subclass-card__portrait {
    min-height: 96px;
  }

  .t2-picker__frame.is-detail .t2-subclass-card img {
    min-height: 96px;
  }
}

.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;
  position: relative;
  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-presentation {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(46px, 1fr));
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(224, 190, 112, 0.46);
  border-radius: 6px;
  background: rgba(3, 9, 19, 0.88);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
}

.t2-overview-presentation button {
  min-height: 28px;
  padding: 0 7px;
  border: 0;
  border-radius: 4px;
  outline: none;
  background: transparent;
  color: #9da8b8;
  font-size: 0.66rem;
  font-weight: 900;
  cursor: pointer;
}

.t2-overview-presentation button:hover,
.t2-overview-presentation button:focus-visible {
  color: #fff3d5;
}

.t2-overview-presentation button.is-active {
  background: var(--t2-card-accent);
  color: #07101c;
  box-shadow: 0 3px 11px color-mix(in srgb, var(--t2-card-accent) 34%, transparent);
}

.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: flex;
  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 {
    justify-content: flex-start;
    overflow-x: auto;
  }

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

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