@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=DM+Sans:wght@400;450;500;550;600;650;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #070f1c;
  --surface: #0d192b;
  --surface-raised: #13243b;
  --border: #25374f;
  --text: #f1f4f8;
  --muted: #a1b0c4;
  --accent: #81c4f4;
  --accent-bright: #c3e8ff;
  --gold: #d8bd87;
  --green: #91cebb;
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: default;
}
svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button {
  border: 0;
}
::selection {
  background: #506b98;
  color: white;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 90px;
  background: var(--accent);
  color: #10151e;
  padding: 12px;
  z-index: 100;
}
.skip-link:focus {
  top: 10px;
}
.rail {
  width: 76px;
  position: fixed;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #10213a, #0b1728 65%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
  gap: 7px;
}
.rail-brand {
  margin-bottom: 24px;
  width: 46px;
  height: 46px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #346798, #13253d 75%);
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px #d8bd8712;
}
.rail-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.home-icon-portrait img {
  transform: scale(1.2);
  transform-origin: 50% 35%;
}
.rail-brand.home-icon-emblem img {
  width: 30px;
  height: 30px;
}
.rail-link .rail-game-icon {
  width: 27px;
  height: 27px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.18s;
}
.rail-link:hover .rail-game-icon,
.rail-link.active .rail-game-icon,
.rail-link:focus-visible .rail-game-icon {
  opacity: 1;
}
.home-icon-picker {
  margin: 25px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.home-icon-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.home-icon-option {
  padding: 16px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: center;
}
.home-icon-option[aria-pressed="true"] {
  border-color: var(--gold);
  background: #1a3557;
}
.home-icon-option:hover {
  border-color: var(--accent);
}
.home-icon-option strong {
  font-size: 12px;
}
.home-icon-option > span:last-child {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}
.home-icon-preview {
  width: 56px;
  height: 56px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  overflow: hidden;
  background: #183451;
  display: grid;
  place-items: center;
}
.home-icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.home-icon-preview.home-icon-emblem img {
  width: 36px;
  height: 36px;
}
.rail-brand.home-icon-badge,
.home-icon-preview.home-icon-badge {
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.home-icon-selection {
  color: var(--accent);
  font-size: 12px;
}
.rail-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #949fb2;
  position: relative;
  background: transparent;
  transition:
    background 0.18s,
    color 0.18s;
}
.rail-link:hover {
  color: var(--text);
  background: #1b2432;
}
.rail-link.active {
  background: #1a3557;
  color: var(--accent-bright);
  box-shadow: inset 0 0 0 1px #81c4f42b;
}
.rail-link.active:before {
  content: "";
  height: 20px;
  width: 2px;
  position: absolute;
  left: -16px;
  background: var(--gold);
  border-radius: 10px;
}
.rail-link svg {
  width: 21px;
  height: 21px;
}
.rail-link .tooltip {
  display: none;
  position: absolute;
  left: 52px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: #1b2432;
  border-radius: 6px;
  white-space: nowrap;
  color: var(--text);
  font-size: 12px;
  box-shadow: 0 5px 25px #0007;
}
.rail-link:hover .tooltip,
.rail-link:focus-visible .tooltip {
  display: block;
}
.rail-divider {
  height: 1px;
  background: var(--border);
  width: 25px;
  margin: 16px 0;
}
.rail-bottom {
  margin-top: auto;
}
.shell {
  margin-left: 76px;
}
.topbar {
  height: 90px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 45px;
  gap: 20px;
  background: #070f1cf2;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}
.wordmark {
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: -0.4px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wordmark span {
  color: var(--gold);
}
.wordmark small {
  font-family: var(--font);
  color: #8ea1b9;
  font-size: 9px;
  letter-spacing: 1px;
  font-weight: 400;
  border-left: 1px solid var(--border);
  padding-left: 18px;
  margin-left: 14px;
}
.mode-switch {
  display: flex;
  padding: 4px;
  background: #0d1b2e;
  border: 1px solid var(--border);
  border-radius: 24px;
  gap: 4px;
}
.mode-switch a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.mode-switch a svg {
  width: 16px;
  height: 16px;
}
.mode-switch a.active {
  background: #e7edf3;
  color: #13233b;
  box-shadow: 0 2px 8px #0003;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.preview-badge {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.preview-badge:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.top-search {
  width: 33px;
  height: 33px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.main {
  max-width: 1480px;
  margin: auto;
  padding: 37px 45px 0;
  min-height: calc(100vh - 90px);
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 27px;
  gap: 20px;
}
.page-heading h1 {
  font-size: 29px;
  letter-spacing: -1px;
  margin: 5px 0 8px;
  line-height: 1.2;
  font-weight: 650;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: #10161f;
  border-radius: 5px;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.badge-accent {
  color: var(--accent);
  border-color: #2d3c55;
  background: #18212f;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 400px;
  border: 1px solid #3d5574;
  background: linear-gradient(110deg, #102139 2%, #15355e 60%, #0b1a30 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 38px 46px;
  margin-bottom: 22px;
  box-shadow:
    inset 0 0 0 6px #07152366,
    0 16px 50px #02071144;
}
.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 76% 45%, #67adf142, transparent 48%),
    linear-gradient(90deg, #0e1c31, #0e1c3100 66%);
  pointer-events: none;
  z-index: 0;
}
.hero-text {
  position: relative;
  z-index: 3;
  width: 50%;
}
.hero .eyebrow {
  font-size: 9px;
  letter-spacing: 2.5px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.hero .eyebrow:before {
  content: "";
  width: 19px;
  height: 1px;
  background: var(--accent);
}
.hero h2 {
  font-family: var(--font-display);
  font-size: 76px;
  line-height: 0.92;
  letter-spacing: -2px;
  font-weight: 500;
  margin: 22px 0 20px;
}
.hero h2 span {
  color: var(--accent-bright);
  font-style: italic;
}
.hero p {
  color: #c0d0e2;
  font-size: 13px;
  line-height: 1.9;
  max-width: 385px;
  margin: 0 0 24px;
}
.hero-art {
  position: absolute;
  width: 69%;
  height: 122%;
  object-fit: contain;
  right: -5%;
  bottom: -10%;
  filter: drop-shadow(0 12px 32px #02091a66);
  z-index: 2;
  pointer-events: none;
}
.hero-circle {
  display: none;
}
.hero-circle:after {
  display: none;
}
.hero-star {
  display: none;
}
.hero-art-label {
  position: absolute;
  right: 28px;
  bottom: 24px;
  padding: 12px 17px;
  border: 1px solid #d8bd8744;
  border-radius: 12px;
  background: #0b1b31c9;
  backdrop-filter: blur(14px);
  color: var(--text);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s;
}
.hero-art-label:before {
  display: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 10px 15px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  transition: background 0.18s;
  border: 1px solid transparent;
  text-align: center;
}
.btn svg {
  width: 15px;
  height: 15px;
}
.btn-primary {
  background: #eee8dc;
  color: #10213a;
  border-color: #eee8dc;
  box-shadow: 0 2px 10px #02071122;
}
.btn-primary:hover {
  background: #fff9ed;
  border-color: var(--gold);
}
.btn-secondary {
  background: #163455;
  border-color: #466487;
  color: #d5eafa;
}
.btn-secondary:hover {
  background: #22486f;
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 8px;
}
.btn-ghost:hover {
  color: var(--text);
}
.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 34px;
}
.entry-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 23px;
  border: 1px solid var(--border);
  background: linear-gradient(120deg, #10213a, var(--surface));
  border-radius: 14px;
  transition:
    border-color 0.18s,
    transform 0.18s;
  position: relative;
  overflow: hidden;
}
.entry-card:hover {
  border-color: #7494b7;
  transform: translateY(-2px);
}
.entry-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 1px solid #81c4f433;
  border-radius: 50%;
  background: #18385b;
}
.entry-card .eyebrow {
  font-size: 8px;
  letter-spacing: 1.4px;
  margin-bottom: 5px;
}
.entry-card h3 {
  font-size: 14px;
  letter-spacing: -0.2px;
  font-weight: 550;
  margin: 0 0 4px;
}
.entry-card p {
  color: var(--muted);
  font-size: 10px;
  margin: 0;
  line-height: 1.6;
}
.entry-arrow {
  margin-left: auto;
  color: var(--accent);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
}
.section-heading h2 {
  font-size: 19px;
  letter-spacing: -0.6px;
  font-weight: 600;
  margin: 0;
}
.section-heading h3 {
  font-size: 16px;
  font-weight: 550;
  margin: 0;
}
.section-heading .muted {
  font-size: 10px;
}
.text-link {
  color: var(--accent);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.text-link svg {
  width: 13px;
  height: 13px;
}
.catalog-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.search-box {
  background: #0e131c;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border-radius: 7px;
  min-width: 240px;
  height: 37px;
}
.search-box svg {
  width: 16px;
  color: var(--muted);
}
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 11px;
  width: 100%;
  min-width: 0;
}
.search-box input::placeholder {
  color: #68717f;
}
.search-box kbd {
  font-size: 9px;
  color: #5d6471;
  padding: 2px 4px;
  border: 1px solid var(--border);
  border-radius: 3px;
}
.element-filters {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter {
  min-height: 32px;
  padding: 7px 11px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter:hover {
  background: #131924;
  color: var(--text);
}
.filter.active {
  background: #1e283a;
  border-color: #32435f;
  color: var(--accent-bright);
}
.filter img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.filter.element-filter {
  padding: 7px;
}
.character-grid {
  --portrait-size: clamp(144px, 10.5vw, 180px);
  --compact-card-width: calc(var(--portrait-size) + 86px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--compact-card-width)), 1fr));
  gap: 14px;
  margin-bottom: 34px;
}
.character-card {
  --portrait-size: clamp(144px, 10.5vw, 180px);
  --card-color: #101d30;
  --card-border: var(--border);
  --card-accent: #7c9ebd;
  position: relative;
  min-width: 0;
  border: 1px solid var(--card-border);
  background: var(--card-color);
  border-radius: 14px;
  overflow: hidden;
  transition:
    transform 0.18s,
    border-color 0.18s;
  display: grid;
  grid-template-columns: var(--portrait-size) minmax(0, 1fr);
}
.character-card[data-element="Pyro"] { --card-color: #281c24; --card-border: #63414b; --card-accent: #ef936f; }
.character-card[data-element="Hydro"] { --card-color: #112840; --card-border: #365572; --card-accent: #70b7ec; }
.character-card[data-element="Anemo"] { --card-color: #152c2d; --card-border: #3a5c59; --card-accent: #71d5ba; }
.character-card[data-element="Electro"] { --card-color: #251f37; --card-border: #554668; --card-accent: #b08be2; }
.character-card[data-element="Dendro"] { --card-color: #202c21; --card-border: #4b6042; --card-accent: #a5cb73; }
.character-card[data-element="Cryo"] { --card-color: #1c2c37; --card-border: #445d70; --card-accent: #99d7e5; }
.character-card[data-element="Geo"] { --card-color: #2c261e; --card-border: #675741; --card-accent: #dec17a; }
/* Rarity frames remain legible over every elemental card background. */
.character-card[data-rarity="5"] { --card-border: #b89554; --card-accent: #e8c987; }
.character-card[data-rarity="4"] { --card-border: #956cc3; --card-accent: #c7a0f0; }
.character-card:hover,
.character-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--card-accent);
}
.portrait-wrap {
  min-height: var(--portrait-size);
  align-self: stretch;
  position: relative;
  overflow: hidden;
  background: var(--card-color);
}
.portrait-wrap:after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 25px;
  background: linear-gradient(90deg, transparent, var(--card-color));
}
.portrait-wrap > img:not(.portrait-watermark) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.25s;
  transform-origin: center top;
  position: absolute;
  inset: 0;
}
.character-card:hover .portrait-wrap > img:not(.portrait-watermark) {
  transform: scale(1.05);
}
.element-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #0b1a2de6;
  border: 1px solid #54799d55;
}
.element-tag img {
  width: 17px;
  height: 17px;
}
.character-meta {
  padding: 16px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--card-color);
  min-height: var(--portrait-size);
}
.character-meta h3 {
  margin: 0 0 7px;
  font-size: 12px;
  letter-spacing: -0.15px;
  font-weight: 650;
  line-height: 1.5;
  white-space: normal;
}
.character-meta p {
  margin: 0;
  font-size: 9px;
  color: var(--muted);
}
.stars {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 1.5px;
  margin-top: 10px;
  line-height: 1;
}
.section-rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 25px 0;
}
.reference-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-bottom: 32px;
}
.reference-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.reference-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  padding: 15px;
  display: block;
  min-height: 100px;
}
.reference-card:hover {
  border-color: #465878;
}
.reference-card h3 {
  font-size: 11px;
  line-height: 1.5;
  font-weight: 600;
  margin: 7px 0 4px;
}
.reference-card p {
  font-size: 9px;
  color: var(--muted);
  margin: 0;
}
.reference-card .reference-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 75px;
  color: var(--accent);
}
.reference-icon > svg {
  height: 45px;
  width: 45px;
  stroke-width: 1;
}
.reference-icon > img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 35px;
  color: #6d7787;
  font-size: 9px;
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer a:hover {
  color: var(--accent);
}
.empty-state {
  padding: 45px 20px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 9px;
  color: var(--muted);
  grid-column: 1/-1;
  font-size: 12px;
}
.empty-state h3 {
  color: var(--text);
  font-size: 17px;
}
.panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 24px;
}
.panel h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0 0 16px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 22px;
}
.breadcrumb svg {
  width: 12px;
  height: 12px;
}
.breadcrumb a:hover {
  color: var(--accent);
}
.detail-hero {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 35px;
  min-height: 265px;
  padding: 30px 38px;
  background:
    radial-gradient(ellipse at 23% 100%, #32486d66, transparent 60%),
    var(--surface);
}
.detail-portrait {
  width: 230px;
  height: 250px;
  object-fit: contain;
  align-self: flex-end;
  margin-bottom: -30px;
}
.detail-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
}
.detail-copy h1 {
  font-size: 37px;
  font-weight: 550;
  letter-spacing: -1px;
  margin: 8px 0;
}
.detail-copy .description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin: 12px 0 18px;
}
.detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.detail-element {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--accent);
  font-size: 10px;
}
.detail-element img {
  width: 17px;
  height: 17px;
}
.tabs {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid var(--border);
  margin: 25px 0;
}
.tab {
  background: transparent;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  padding: 14px 0;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.tab svg {
  width: 15px;
  height: 15px;
}
.tab.active {
  border-bottom-color: var(--accent);
  color: var(--accent-bright);
}
.detail-content {
  min-height: 340px;
}
.overview-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}
.stat-list {
  margin: 0;
}
.stat-list div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 13px 0;
  font-size: 12px;
}
.stat-list div:last-child {
  border-bottom: 0;
}
.stat-list dt {
  color: var(--muted);
}
.stat-list dd {
  margin: 0;
}
.content-text {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 17px;
  background: #171e2b;
  border: 1px solid #243147;
  border-radius: 8px;
  margin-bottom: 20px;
  color: #a6b4cb;
  font-size: 11px;
  line-height: 1.6;
}
.notice svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--accent);
}
.talent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.talent-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.talent-icon {
  width: 37px;
  height: 37px;
  background: #161f2e;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.talent-head h3 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
}
.talent-head p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}
.talent-description {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  min-height: 60px;
}
.talent-description strong {
  color: var(--accent);
}
.range-heading {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin: 20px 0 10px;
}
.range-heading output {
  color: var(--accent);
  font-weight: 600;
}
.level-range {
  width: 100%;
  accent-color: var(--accent);
  height: 3px;
  cursor: pointer;
  margin: 8px 0 5px;
}
.range-limits {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  color: #677183;
  margin: 6px 0 21px;
}
.multiplier-label {
  font-size: 10px;
  font-weight: 600;
  margin: 18px 0 9px;
}
.multiplier-table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 10px;
}
.multiplier-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
}
.multiplier-table tr:last-child td {
  border-bottom: 0;
}
.multiplier-table td:first-child {
  color: var(--muted);
}
.multiplier-table td:last-child {
  text-align: right;
  font-weight: 600;
}
.constellation-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.constellation-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.constellation-number {
  color: var(--accent);
  border: 1px solid #2c3950;
  min-width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 11px;
}
.constellation-item h3 {
  font-size: 12px;
  margin: 3px 0 6px;
}
.constellation-item p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
.voice-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.field > span,
.field > label {
  font-size: 10px;
  color: var(--muted);
}
.field input,
.field select,
.voice-toolbar select {
  border: 1px solid var(--border);
  background: #080c14;
  border-radius: 6px;
  min-height: 39px;
  color: var(--text);
  padding: 9px 11px;
  font-size: 11px;
  width: 100%;
}
.voice-toolbar select {
  width: 140px;
}
.voice-item {
  display: flex;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 17px 0;
}
.voice-item:last-child {
  border-bottom: none;
}
.voice-item h3 {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 550;
}
.voice-item p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  margin: 0;
}
.voice-placeholder {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: #555f71;
  flex-shrink: 0;
}
.voice-placeholder svg {
  width: 15px;
  height: 15px;
}
.voice-item .badge {
  margin-left: auto;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.library-grid .reference-card {
  padding: 24px;
}
.library-grid .reference-card h3 {
  font-size: 14px;
}
.library-grid .reference-card .reference-icon {
  height: 140px;
}
.library-grid .reference-icon > img {
  width: 130px;
  height: 130px;
}
.library-grid .reference-icon > svg {
  width: 75px;
  height: 75px;
}
.library-grid .reference-card p {
  font-size: 11px;
  line-height: 1.8;
  margin-top: 10px;
}
.roadmap-intro {
  max-width: 650px;
  margin-bottom: 32px;
}
.roadmap-intro h2 {
  font-size: 34px;
  font-weight: 550;
  line-height: 1.3;
  letter-spacing: -1px;
}
.roadmap-intro h2 span {
  color: var(--accent);
}
.milestone-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.milestone {
  position: relative;
}
.milestone-number {
  font-size: 32px;
  letter-spacing: -1px;
  color: #36455e;
  margin-bottom: 20px;
}
.milestone h2 {
  font-size: 18px;
  margin: 12px 0;
}
.milestone p,
.milestone li {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}
.milestone ul {
  padding-left: 17px;
  margin-bottom: 0;
}
.architecture {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 28px 18px;
  margin-top: 25px;
  flex-wrap: wrap;
}
.architecture-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  padding: 18px 30px;
  font-size: 13px;
  color: var(--accent-bright);
  background: #101723;
}
.architecture-block small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 6px;
}
.architecture-arrow {
  color: var(--muted);
}
dialog {
  max-width: 500px;
  width: calc(100% - 40px);
  border: 1px solid #34435c;
  background: #10161f;
  color: var(--text);
  padding: 30px;
  border-radius: 13px;
  box-shadow: 0 10px 100px #0009;
}
dialog::backdrop {
  background: #03060bd9;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
  margin: 0 0 16px;
}
dialog p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
dialog a {
  color: var(--accent);
}
.dialog-close {
  position: absolute;
  right: 14px;
  top: 14px;
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 6px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: calc(50% + 38px);
  transform: translateX(-50%) translateY(20px);
  background: #243146;
  color: var(--accent-bright);
  border: 1px solid #435677;
  border-radius: 9px;
  padding: 12px 22px;
  z-index: 100;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.optimizer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 1fr);
  gap: 20px;
  align-items: start;
}
.optimizer-layout .panel {
  padding: 24px;
}
.fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.optimizer-artifacts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.optimizer-artifact {
  background: #090d15;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px;
  min-width: 0;
}
.optimizer-artifact h3 {
  font-size: 11px;
  margin: 10px 0 16px;
  color: #b6c4dd;
}
.optimizer-artifact .field {
  margin-top: 12px;
}
.optimizer-artifact select {
  font-size: 10px;
  padding: 8px;
}
.optimizer-artifact svg {
  color: var(--accent);
}
.optimizer-builds {
  margin-top: 20px;
}
.optimizer-status {
  font-size: 10px;
  color: var(--green);
  margin-top: 12px;
}
.optimizer-preview {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.optimizer-placeholder {
  padding: 32px 20px;
  text-align: center;
  border: 1px dashed #293549;
  border-radius: 8px;
  background: #10161f;
  margin-top: 20px;
}
.optimizer-placeholder svg {
  width: 30px;
  height: 30px;
  color: #515f78;
  margin-bottom: 10px;
}
.optimizer-placeholder h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 5px 0 10px;
}
.optimizer-placeholder p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 270px;
  margin: 0 auto;
}
.optimizer-saved-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.optimizer-saved-item img {
  width: 37px;
  height: 37px;
  object-fit: contain;
  border-radius: 7px;
  background: #1c2535;
}
.optimizer-saved-item h3 {
  font-size: 12px;
  margin: 0 0 4px;
}
.optimizer-saved-item p {
  font-size: 9px;
  color: var(--muted);
  margin: 0;
}
.optimizer-saved-item .button-row {
  margin-left: auto;
}
.optimizer-saved-item .btn {
  padding: 7px 10px;
  min-height: 30px;
  font-size: 9px;
}
.btn:disabled {
  opacity: 0.45;
}
.optimizer-section {
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.optimizer-section h3 {
  font-size: 12px;
  font-weight: 550;
  margin: 0 0 16px;
}
.optimizer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.optimizer-heading h2 {
  margin: 0;
}
.optimizer-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
}
.optimizer-avatar {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}
.optimizer-avatar img {
  width: 54px;
  height: 64px;
  object-fit: contain;
  border-radius: 9px;
  background: #1b273b;
}
.optimizer-avatar h3 {
  margin: 0 0 5px;
  font-size: 16px;
}
.optimizer-avatar p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
}
.optimizer-save-note {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.6;
}
.optimizer-form-section {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  margin-top: 24px;
}
.optimizer-form-section h3 {
  font-size: 13px;
  margin: 0 0 17px;
}
.optimizer-wide {
  grid-column: 1/-1;
}
.optimizer-target-fields {
  display: grid;
  gap: 17px;
}
.saved-builds-list {
  margin-top: 15px;
}
.optimizer-saved-build {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--border);
}
.optimizer-saved-build strong {
  font-size: 12px;
}
.optimizer-saved-build small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 6px;
}
.optimizer-saved-build button {
  font-size: 10px;
}
.optimizer-full-width {
  width: 100%;
  margin-top: 20px;
}
.optimizer-artifacts-panel {
  margin-top: 20px;
}
.optimizer-result-placeholder {
  border: 1px dashed #303b4e;
  border-radius: 9px;
  padding: 30px 20px;
  margin-top: 20px;
  text-align: center;
}
.optimizer-result-placeholder h3 {
  font-size: 14px;
  font-weight: 500;
}
.optimizer-result-placeholder p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}

@media (min-width: 1700px) {
  .main {
    padding-top: 43px;
  }
  .hero {
    min-height: 320px;
  }
  .hero h2 {
    font-size: 50px;
  }
  .character-meta {
    padding: 15px 4px;
  }
  .character-meta h3 {
    font-size: 12px;
  }
  .hero-art {
    right: -3%;
    width: 64%;
  }
  .reference-card .reference-icon {
    height: 100px;
  }
  .reference-icon > img {
    width: 90px;
    height: 90px;
  }
}
@media (max-width: 1250px) {
  .main {
    padding: 30px 30px 0;
  }
  .topbar {
    padding: 0 30px;
  }
  .wordmark small {
    display: none;
  }
  .character-meta h3 {
    font-size: 12px;
  }
  .element-filters {
    gap: 2px;
  }
  .hero h2 {
    font-size: 39px;
  }
  .hero-art {
    right: -15%;
    width: 77%;
  }
  .optimizer-artifacts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .optimizer-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(270px, 1fr);
  }
}
@media (max-width: 900px) {
  .topbar {
    height: 76px;
  }
  .topbar-right .preview-badge {
    display: none;
  }
  .main {
    padding: 25px 24px 0;
  }
  .hero {
    padding: 28px;
    min-height: 270px;
  }
  .hero h2 {
    font-size: 34px;
  }
  .hero-text {
    width: 60%;
  }
  .hero-art {
    width: 90%;
    right: -28%;
    opacity: 0.75;
  }
  .hero-art-label {
    display: none;
  }
  .catalog-tools {
    align-items: flex-start;
    flex-direction: column;
  }
  .search-box {
    width: 100%;
  }
  .element-filters {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  .filter.element-filter {
    padding: 7px 10px;
  }
  .reference-grid {
    grid-template-columns: 1fr;
  }
  .optimizer-layout {
    grid-template-columns: 1fr;
  }
  .optimizer-artifacts {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .overview-layout {
    grid-template-columns: 1fr;
  }
  .detail-hero {
    padding: 25px;
    gap: 20px;
  }
  .detail-portrait {
    width: 150px;
    height: 220px;
    margin-bottom: -25px;
  }
  .detail-copy h1 {
    font-size: 29px;
  }
  .talent-grid {
    grid-template-columns: 1fr;
  }
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .milestone-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero p {
    max-width: 270px;
  }
  .mode-switch a {
    padding: 9px 14px;
  }
  .topbar {
    padding: 0 24px;
  }
  .wordmark {
    font-size: 20px;
  }
}
@media (max-width: 640px) {
  .rail {
    width: 55px;
    padding-top: 19px;
  }
  .rail-brand img {
    width: 100%;
    height: 100%;
  }
  .rail-brand {
    margin-bottom: 25px;
    width: 36px;
    height: 36px;
  }
  .rail-brand.home-icon-emblem img {
    width: 24px;
    height: 24px;
  }
  .rail-link .rail-game-icon {
    width: 23px;
    height: 23px;
  }
  .home-icon-options {
    grid-template-columns: 1fr;
  }
  .rail-link {
    width: 36px;
    height: 39px;
    border-radius: 8px;
  }
  .rail-link.active:before {
    left: -10px;
  }
  .rail-link svg {
    width: 18px;
    height: 18px;
  }
  .rail-link .tooltip {
    left: 43px;
  }
  .shell {
    margin-left: 55px;
  }
  .topbar {
    padding: 0 15px;
    height: 72px;
    gap: 12px;
  }
  .wordmark {
    font-size: 16px;
    letter-spacing: -0.6px;
  }
  .wordmark span {
    display: none;
  }
  .mode-switch {
    gap: 0;
    padding: 3px;
  }
  .mode-switch a {
    padding: 9px 10px;
    font-size: 9px;
    gap: 5px;
  }
  .mode-switch a svg {
    width: 13px;
    height: 13px;
  }
  .topbar-right {
    display: none;
  }
  .main {
    padding: 25px 16px 0;
  }
  .page-heading {
    margin-bottom: 20px;
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 23px;
    letter-spacing: -0.8px;
  }
  .page-heading p {
    font-size: 10px;
  }
  .page-heading > .badge {
    display: none;
  }
  .hero {
    padding: 26px 23px;
    min-height: 280px;
  }
  .hero-text {
    width: 100%;
  }
  .hero h2 {
    font-size: 32px;
    letter-spacing: -1px;
  }
  .hero p {
    max-width: 210px;
    font-size: 10px;
  }
  .hero-art {
    width: 135%;
    right: -61%;
    bottom: -28%;
    opacity: 0.33;
    z-index: 1;
  }
  .hero .eyebrow {
    font-size: 8px;
  }
  .hero-circle {
    right: -50%;
    width: 300px;
    height: 300px;
    top: 0;
  }
  .hero-star {
    display: none;
  }
  .hero .button-row .btn {
    font-size: 10px;
    min-height: 35px;
    padding: 8px 11px;
  }
  .entry-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 26px;
  }
  .entry-card {
    padding: 16px;
  }
  .entry-card h3 {
    font-size: 13px;
  }
  .entry-card p {
    font-size: 9px;
  }
  .entry-icon {
    width: 35px;
    height: 35px;
  }
  .section-heading {
    gap: 10px;
    margin-bottom: 16px;
  }
  .section-heading h2 {
    font-size: 17px;
  }
  .section-heading .muted {
    font-size: 8px;
  }
  .character-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .character-meta {
    padding: 12px;
  }
  .character-meta h3 {
    font-size: 11px;
  }
  .element-filters {
    gap: 3px;
    flex-wrap: wrap;
  }
  .filter.element-filter {
    padding: 7px;
  }
  .filter {
    font-size: 9px;
    padding: 7px;
  }
  .search-box {
    min-width: 0;
  }
  .reference-preview {
    gap: 8px;
  }
  .reference-card {
    padding: 10px;
  }
  .reference-card .reference-icon {
    height: 60px;
  }
  .reference-icon > img {
    width: 55px;
    height: 55px;
  }
  .reference-card h3 {
    font-size: 10px;
  }
  .footer {
    font-size: 8px;
    align-items: flex-start;
    gap: 15px;
  }
  .footer-links {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
  }
  .detail-hero {
    padding: 23px 20px;
    min-height: 250px;
    display: block;
  }
  .detail-portrait {
    position: absolute;
    right: -20px;
    bottom: 0;
    opacity: 0.2;
    width: 230px;
    height: 270px;
  }
  .detail-copy h1 {
    font-size: 30px;
  }
  .detail-copy .description {
    font-size: 11px;
  }
  .tabs {
    gap: 20px;
    overflow: auto;
    white-space: nowrap;
    margin: 15px 0 20px;
  }
  .tab {
    font-size: 10px;
  }
  .tab svg {
    display: none;
  }
  .panel {
    padding: 20px;
  }
  .constellation-list {
    grid-template-columns: 1fr;
  }
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .library-grid .reference-card {
    padding: 15px;
  }
  .library-grid .reference-card .reference-icon {
    height: 100px;
  }
  .library-grid .reference-icon > img {
    width: 100px;
    height: 100px;
  }
  .library-grid .reference-card h3 {
    font-size: 12px;
  }
  .milestone-grid {
    grid-template-columns: 1fr;
  }
  .roadmap-intro h2 {
    font-size: 27px;
  }
  .architecture {
    gap: 12px;
    flex-direction: column;
  }
  .architecture-arrow {
    transform: rotate(90deg);
  }
  .architecture-block {
    width: 100%;
  }
  .optimizer-artifacts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .optimizer-layout .panel {
    padding: 18px;
  }
  .fields-grid {
    gap: 12px;
  }
  .optimizer-actions {
    flex-wrap: wrap;
  }
  .voice-item .badge {
    display: none;
  }
  .voice-toolbar {
    align-items: flex-start;
  }
  #toast {
    left: calc(50% + 27px);
    max-width: calc(100% - 90px);
    font-size: 10px;
  }
  .optimizer-saved-build {
    align-items: flex-start;
  }
  .optimizer-saved-build .button-row {
    flex-wrap: nowrap;
  }
  .optimizer-saved-build .btn {
    padding: 8px;
    font-size: 9px;
  }
  .button-row {
    gap: 8px;
  }
}
.optimizer-layout {
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.7fr);
}
.optimizer-right-column {
  display: grid;
  gap: 20px;
}
.optimizer-artifacts-panel {
  margin-top: 0;
}
.optimizer-heading {
  margin-bottom: 25px;
}
.optimizer-title-dot {
  color: var(--accent);
}
.optimizer-notice {
  display: flex;
  gap: 13px;
  border: 1px solid #2b384d;
  background: #161e2c;
  border-radius: 9px;
  padding: 17px 20px;
  margin-bottom: 24px;
  align-items: center;
}
.optimizer-notice-symbol {
  font-size: 24px;
  color: var(--accent);
}
.optimizer-notice strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin-bottom: 6px;
}
.optimizer-notice div > span {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  display: block;
}
.optimizer-character-preview {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #131b28;
  border: 1px solid #242e40;
  border-radius: 9px;
  padding: 12px;
  margin: 20px 0;
}
.optimizer-character-image {
  width: 52px;
  height: 66px;
  object-fit: contain;
}
.optimizer-character-preview strong {
  font-size: 13px;
  display: block;
  margin-bottom: 5px;
}
.optimizer-character-preview .muted {
  font-size: 9px;
  display: block;
}
.optimizer-rarity {
  color: var(--gold);
  display: block;
  letter-spacing: 1px;
  font-size: 9px;
  margin-top: 8px;
}
.optimizer-reference-link {
  margin-left: auto;
  color: var(--accent);
}
.optimizer-two-fields {
  margin: 16px 0 0;
}
.optimizer-form-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}
.optimizer-builder .section-heading {
  margin-bottom: 18px;
}
.optimizer-builder .section-heading h2 {
  margin: 4px 0 0;
  font-size: 16px;
}
.optimizer-builder .field {
  margin-bottom: 16px;
}
.optimizer-talents {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.optimizer-talents .field > span {
  font-size: 9px;
  white-space: nowrap;
}
.optimizer-talent-heading {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin: 22px 0 14px;
}
.optimizer-talent-heading .muted {
  font-size: 9px;
}
.optimizer-text-link {
  display: inline-flex;
  gap: 8px;
  color: var(--accent);
  align-items: center;
  font-size: 10px;
  margin-top: 7px;
}
.optimizer-text-link svg {
  width: 13px;
  height: 13px;
}
.optimizer-artifacts-panel .section-heading h2,
.optimizer-target-panel .section-heading h2 {
  margin: 7px 0 0;
}
.optimizer-section-copy {
  font-size: 10px;
  margin: -3px 0 22px;
  line-height: 1.8;
}
.optimizer-artifact-card {
  border: 1px solid var(--border);
  background: #090d15;
  border-radius: 8px;
  padding: 13px 10px;
}
.optimizer-slot-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.optimizer-slot-icon {
  font-size: 24px;
  color: var(--accent);
}
.optimizer-slot-number {
  font-size: 9px;
  color: #434e62;
}
.optimizer-artifact-card h3 {
  font-size: 10px;
  line-height: 1.5;
  min-height: 30px;
  margin: 0 0 15px;
  font-weight: 550;
}
.optimizer-artifact-card .field {
  margin-top: 14px;
}
.optimizer-artifact-card .field > span {
  font-size: 9px;
}
.optimizer-artifact-card select,
.optimizer-artifact-card input {
  font-size: 9px;
  padding: 8px 6px;
  min-height: 34px;
}
.optimizer-artifact-note {
  font-size: 9px;
  line-height: 1.7;
  margin: 18px 0 0;
}
.optimizer-target-symbol {
  font-size: 24px;
  color: var(--accent);
}
.optimizer-target-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.optimizer-target-fields .field > span {
  font-size: 9px;
  min-height: 22px;
}
.optimizer-engine-button {
  width: 100%;
  border: 1px solid #313e54;
  color: var(--accent);
  background: #202b3e;
  margin-top: 24px;
  padding: 15px;
  min-height: 45px;
}
.optimizer-save-panel {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 20px;
  align-items: center;
}
.optimizer-save-actions {
  display: flex;
  gap: 10px;
  padding-top: 16px;
}
.optimizer-save-status {
  grid-column: 1/-1;
  margin: 4px 0 0;
  font-size: 9px;
}
.optimizer-saved-panel {
  margin-top: 24px;
}
.optimizer-saved-panel .section-heading h2 {
  margin: 6px 0 0;
}
.optimizer-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: left;
}
.optimizer-empty-symbol {
  font-size: 30px;
  color: #475a79;
}
.optimizer-empty strong {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}
.optimizer-empty p {
  font-size: 10px;
  line-height: 1.7;
}
.optimizer-saved-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}
.optimizer-load-build {
  display: flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  text-align: left;
  flex: 1;
  min-width: 0;
  padding: 5px 0;
}
.optimizer-saved-marker {
  font-size: 25px;
  color: var(--accent);
  padding: 0 12px;
}
.optimizer-load-build strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}
.optimizer-load-build .muted {
  display: block;
  font-size: 9px;
  line-height: 1.6;
}
.optimizer-load-label {
  margin-left: auto;
  color: var(--accent);
  font-size: 10px;
  white-space: nowrap;
}
.optimizer-delete-build {
  padding: 9px;
  min-height: 33px;
}
.optimizer-delete-build svg {
  width: 15px;
  height: 15px;
}
.optimizer-builder .section-heading .eyebrow,
.optimizer-right-column .eyebrow,
.optimizer-saved-panel .eyebrow {
  font-size: 8px;
  margin: 0;
  letter-spacing: 1.5px;
}
@media (max-width: 1250px) {
  .optimizer-artifacts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .optimizer-layout {
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.4fr);
  }
  .optimizer-target-fields {
    grid-template-columns: 1fr;
  }
  .optimizer-target-fields .field > span {
    min-height: 0;
  }
}
@media (max-width: 1000px) {
  .optimizer-layout {
    grid-template-columns: 1fr;
  }
  .optimizer-artifacts {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .optimizer-target-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .optimizer-target-fields .field > span {
    min-height: 24px;
  }
  .optimizer-builder .field {
    margin-bottom: 0;
  }
  .optimizer-builder > label.field {
    margin-top: 18px;
  }
  .optimizer-builder > label.field + .field {
    margin-top: 18px;
  }
  .optimizer-talents {
    margin-bottom: 15px;
  }
}
@media (max-width: 640px) {
  .optimizer-layout {
    gap: 16px;
  }
  .optimizer-artifacts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .optimizer-target-fields {
    grid-template-columns: 1fr;
  }
  .optimizer-target-fields .field > span {
    min-height: 0;
  }
  .optimizer-save-panel {
    grid-template-columns: 1fr;
  }
  .optimizer-save-actions {
    padding-top: 3px;
    justify-content: flex-end;
  }
  .optimizer-save-status {
    font-size: 9px;
  }
  .optimizer-talents {
    gap: 8px;
  }
  .optimizer-talents .field > span {
    font-size: 8px;
    white-space: normal;
  }
  .optimizer-talents .field input {
    padding: 8px;
  }
  .optimizer-notice {
    padding: 14px;
  }
  .optimizer-load-label {
    display: none;
  }
  .optimizer-saved-marker {
    padding: 0 3px;
  }
  .optimizer-load-build strong {
    font-size: 11px;
  }
  .optimizer-load-build .muted {
    font-size: 8px;
  }
  .optimizer-artifact-card h3 {
    min-height: 0;
  }
  .optimizer-reference-link {
    padding: 5px;
  }
  .optimizer-empty {
    padding: 20px 14px;
  }
  .optimizer-empty-symbol {
    display: none;
  }
}
#content {
  scroll-margin-top: 100px;
}
.search-box input,
.field input,
.field select,
.voice-toolbar select {
  font-size: 12px;
}
.field > span,
.field > label {
  font-size: 11px;
}
.hero p {
  font-size: 13px;
}
.character-meta h3 {
  font-size: 12px;
}
.character-meta p,
.reference-card p {
  font-size: 10px;
}
@media (max-width: 640px) {
  #content {
    scroll-margin-top: 80px;
  }
  .hero p {
    font-size: 11px;
  }
  .character-meta h3 {
    font-size: 12px;
  }
  .optimizer-artifact-card .field > span,
  .optimizer-target-fields .field > span,
  .optimizer-talents .field > span {
    font-size: 10px;
  }
  .optimizer-artifact-card select,
  .optimizer-artifact-card input {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Furina's theatre: gold framing, water motifs, and pearl highlights. */
/* Released reference-data screens use the same shared Fontaine palette. */
.reference-provenance {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 11px;
}
.reference-provenance details {
  margin-left: auto;
}
.reference-provenance details[open] {
  width: 100%;
}
.reference-provenance summary,
.reference-description summary,
.reference-material-panel summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 11px;
}
.reference-provenance p {
  line-height: 1.8;
  max-width: 850px;
}
.reference-provenance p a {
  color: var(--accent);
}
.reference-level-controls {
  margin: 20px 0;
}
.reference-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.reference-stat-tile {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #0a1526;
  padding: 16px;
  min-width: 0;
}
.reference-stat-tile span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 10px;
}
.reference-stat-tile strong {
  color: var(--accent-bright);
  font-size: 24px;
  font-weight: 550;
}
.reference-note {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin: 18px 0;
}
.reference-official-link {
  margin-top: 20px;
}
.reference-description {
  border-bottom: 1px solid var(--border);
  padding: 10px 0 15px;
  margin: 0 0 15px;
}
.reference-description p,
.reference-text {
  white-space: pre-line;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.reference-passive-heading {
  margin-top: 32px;
}
.reference-passive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.reference-passive-grid h3 {
  font-size: 14px;
  margin: 12px 0;
}
.reference-passive-grid .talent-head {
  align-items: flex-start;
}
.reference-passive-grid .talent-icon {
  flex-shrink: 0;
}
.reference-passive-grid .talent-head h3 {
  margin: 6px 0 0;
  line-height: 1.4;
}
.reference-material-panel {
  margin-top: 20px;
}
.reference-material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 20px;
}
.reference-material-grid h3 {
  font-size: 12px;
}
.reference-material-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.reference-material-grid li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
  padding: 8px 0;
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.reference-material-grid li strong {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.reference-weapon-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.4fr);
  gap: 20px;
  align-items: start;
}
.reference-weapon-image {
  height: 210px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: radial-gradient(ellipse, #26497466, transparent 65%);
}
.reference-weapon-image img {
  height: 190px;
  width: 190px;
  object-fit: contain;
}
.reference-weapon-stats {
  grid-template-columns: 1fr 1fr;
}
.reference-refinement {
  max-width: 220px;
  margin: 25px 0;
}
.reference-card-ready {
  display: inline-block;
  color: var(--accent);
  font-size: 9px;
  margin-top: 12px;
}
.constellation-item .reference-text {
  font-size: 11px;
}
@media (max-width: 900px) {
  .reference-passive-grid {
    grid-template-columns: 1fr;
  }
  .reference-weapon-layout {
    grid-template-columns: 1fr;
  }
  .reference-material-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .reference-stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .reference-stat-tile {
    padding: 13px;
  }
  .reference-stat-tile strong {
    font-size: 22px;
  }
  .reference-stat-tile span {
    font-size: 9px;
  }
  .reference-provenance {
    gap: 12px;
  }
  .reference-provenance details {
    margin-left: 0;
  }
  .reference-material-grid {
    grid-template-columns: 1fr;
  }
  .reference-weapon-layout .page-heading p {
    font-size: 11px;
  }
  .reference-text {
    font-size: 11px;
  }
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 2.8px;
  font-weight: 600;
}
.hero-kicker-line {
  width: 24px;
  height: 1px;
  background: var(--gold);
}
.hero-kicker-star {
  color: var(--accent);
  margin-left: 4px;
  font-size: 12px;
}
.hero-footnote {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 23px;
  font-size: 8px;
  letter-spacing: 1.6px;
  color: #9fb8d5;
}
.hero-footnote span:nth-child(even) {
  color: var(--gold);
}
.hero-stage {
  position: absolute;
  z-index: 1;
  right: 6%;
  top: 30px;
  width: 480px;
  height: 600px;
  border: 1px solid #d8bd8766;
  border-radius: 260px 260px 0 0;
  transform: rotate(9deg);
}
.hero-stage:after {
  content: "";
  position: absolute;
  inset: 17px;
  border: 1px solid #a4cff044;
  border-radius: inherit;
}
.stage-star {
  position: absolute;
  top: 42px;
  right: 59px;
  color: var(--gold);
  font-size: 26px;
}
.hero-waterline {
  position: absolute;
  width: 750px;
  height: 210px;
  bottom: -125px;
  right: -100px;
  border: 1px solid #81c4f449;
  border-radius: 50%;
  transform: rotate(-12deg);
}
.hero-waterline:after {
  content: "";
  position: absolute;
  inset: 15px;
  border: 1px solid #81c4f429;
  border-radius: 50%;
}
.hero-featured-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid #d8bd8755;
  border-radius: 50%;
}
.hero-featured-icon img {
  width: 22px;
  height: 22px;
}
.hero-art-label small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.8px;
  line-height: 1.6;
  color: var(--gold);
  margin-bottom: 7px;
}
.hero-featured-copy { min-width: 0; }
.hero-featured-icon { flex-shrink: 0; }
.hero-art-label { max-width: calc(100% - 40px); }
.hero-art-label strong {
  display: block;
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 500;
  line-height: 1;
}
.hero-art-label > svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  margin-left: 8px;
}
.hero-art-label:hover {
  border-color: var(--gold);
}
.entry-card:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(transparent, var(--accent), transparent);
  opacity: 0.6;
}
.entry-card:last-child:before {
  background: linear-gradient(transparent, var(--gold), transparent);
}
.entry-card:last-child .entry-icon {
  color: var(--gold);
  background: #293447;
  border-color: #d8bd8733;
}
.entry-card:last-child .eyebrow {
  color: var(--gold);
}
.character-card-featured {
  overflow: hidden;
  border-color: #e4c384;
  box-shadow: 0 3px 12px #070f1b40;
}
.character-card-featured .element-tag { border-color: #e4c384; }
.character-card-featured:is(:hover, :focus-visible) .element-tag { border-color: #fff0c8; }
.character-card-featured .portrait-wrap { border-radius: 13px 0 0 13px; background: transparent; }
.character-card-featured .portrait-wrap::after { content: none; }
.character-card-featured .portrait-wrap > img:not(.portrait-watermark) {
  width: 140%;
  height: 140%;
  inset: -20% auto auto -20%;
  object-position: center 35%;
  -webkit-mask-image:
    linear-gradient(to right, #000 77%, #000d 81%, #0005 84.5%, transparent 85.7%);
  mask-image:
    linear-gradient(to right, #000 77%, #000d 81%, #0005 84.5%, transparent 85.7%);
}
.character-card-featured:hover .portrait-wrap > img:not(.portrait-watermark) { transform: none; }
.character-card-featured .character-meta { border-radius: 0 13px 13px 0; background: transparent; position: relative; margin-left: -6px; }
.character-card-featured:hover,
.character-card-featured:focus-visible { border-color: #fff0c8; }
.card-namecard { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.card-namecard img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 65% center; opacity: .75; }
.card-namecard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0b1a2d26, #0b1a2d55 50%, #0b1a2db8 72%, #0b1a2de0); }
.character-card-watermarked .portrait-wrap { background: transparent; }
.character-card-watermarked .portrait-wrap::after { content: none; }
.character-card-watermarked .character-meta { background: transparent; position: relative; }
.card-watermark {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.portrait-watermark {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateX(12%);
  filter: brightness(0) invert(1);
  opacity: .075;
}

.character-card-featured .character-meta h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 11px;
}
.featured-name { display: block; font-size: 30px; letter-spacing: -.4px; color: #f3eee5; }
.featured-name-suffix { display: block; margin-top: 2px; font-size: 13px; font-style: italic; letter-spacing: .1px; color: #e7cb91; }
.character-card-featured .featured-attributes > p {
  font-family: var(--font);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .3px;
  color: #b8def2;
}
.featured-attributes { width: max-content; max-width: 100%; align-self: flex-start; }
.stars-glisten { display: flex; gap: 2px; letter-spacing: 0; }
.character-card-featured .character-meta .stars-glisten { margin-top: 6px; justify-content: center; }
.stars-glisten > span {
  display: inline-block;
  color: #dfc17d;
  animation: star-glisten 8s ease-in-out var(--star-delay) infinite;
}
@keyframes star-glisten {
  0%, 3%, 20%, 100% { color: #dfc17d; text-shadow: none; }
  10% { color: #fff5cf; text-shadow: 0 0 4px #ffe5aacc, 0 0 8px #e6bd6966; }
}
@media (max-width: 640px) {
  .character-card-featured .portrait-wrap { border-radius: 13px 13px 0 0; }
  .character-card-featured .character-meta { border-radius: 0 0 13px 13px; margin-left: 0; }

}
@media (prefers-reduced-motion: reduce) {
  .stars-glisten > span { animation: none; }
}

.character-region {
  margin-top: 18px;
  color: #a8bed7;
  font-size: 9px;
  letter-spacing: 0.5px;
}
.character-meta .stars {
  margin-top: 12px;
}
.reference-card {
  border-radius: 13px;
  background: linear-gradient(140deg, #14233a, var(--surface));
}
.panel {
  border-radius: 14px;
}
.detail-hero {
  background:
    radial-gradient(ellipse at 23% 100%, #32679b66, transparent 60%),
    var(--surface);
}
@media (min-width: 1700px) {
  .hero {
    min-height: 430px;
  }
  .hero h2 {
    font-size: 86px;
  }
  .hero-art {
    width: 68%;
    right: -3%;
  }
}
@media (max-width: 1250px) {
  .hero {
    padding: 36px;
    min-height: 380px;
  }
  .hero h2 {
    font-size: 70px;
  }
  .hero-art {
    right: -10%;
    width: 76%;
  }
  .hero-stage {
    right: 0;
  }
  .hero-linebreak {
    display: none;
  }
}
@media (max-width: 900px) {
  .hero h2 {
    font-size: 60px;
  }
  .hero-text {
    width: 55%;
  }
  .hero-art {
    width: 85%;
    right: -21%;
    opacity: 1;
  }
  .hero p {
    max-width: 280px;
  }
  .hero-stage {
    right: -100px;
  }
  .hero-art-label {
    display: flex;
    right: 18px;
    bottom: 18px;
    padding: 10px 12px;
  }
  .hero-art-label small {
    display: none;
  }
  .hero-art-label strong {
    font-size: 25px;
  }
  .hero-footnote {
    display: none;
  }
}
@media (max-width: 640px) {
  .hero {
    min-height: 530px;
    padding: 28px 25px;
    border-radius: 17px;
    align-items: flex-start;
  }
  .hero-text {
    width: 100%;
  }
  .hero h2 {
    font-size: 57px;
    letter-spacing: -1.5px;
    margin: 18px 0 15px;
  }
  .hero p {
    max-width: 245px;
    font-size: 12px;
    line-height: 1.75;
    margin-bottom: 18px;
  }
  .hero-kicker {
    font-size: 8px;
    gap: 7px;
    letter-spacing: 2px;
  }
  .hero-kicker-line {
    width: 15px;
  }
  .hero .button-row {
    gap: 8px;
  }
  .hero .button-row .btn {
    min-height: 37px;
    font-size: 10px;
    padding: 9px 12px;
  }
  .hero-art {
    height: 57%;
    width: 170%;
    right: -46%;
    bottom: -6%;
    opacity: 1;
  }
  .hero-stage {
    top: 270px;
    right: -70px;
    width: 360px;
    height: 400px;
    border-radius: 180px 180px 0 0;
  }
  .hero-art-label {
    bottom: 17px;
    right: 17px;
    background: #0b1b31e6;
  }
  .hero-art-label .hero-featured-icon {
    width: 26px;
    height: 26px;
  }
  .hero-featured-icon img {
    width: 16px;
    height: 16px;
  }
  .hero-art-label strong {
    font-size: 23px;
  }
  .character-card {
    display: block;
  }
  .portrait-wrap {
    min-height: 0;
    aspect-ratio: 1;
  }
  .portrait-wrap:after {
    inset: auto 0 0;
    width: auto;
    height: 22px;
    background: linear-gradient(transparent, var(--card-color));
  }
  .character-meta {
    min-height: 111px;
    padding: 14px;
  }
  .character-meta h3 {
    font-size: 12px;
    margin-bottom: 5px;
  }
  .character-region {
    margin-top: 12px;
    font-size: 9px;
  }
  .character-meta .stars {
    margin-top: 10px;
  }
  .entry-card {
    padding: 18px;
  }
  .entry-icon {
    width: 36px;
    height: 36px;
  }
}
.material-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 14px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}
.material-card {
  --material-color: #7c93a7;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 9px;
  border: 1px solid color-mix(in srgb, var(--material-color) 65%, transparent);
  border-radius: 16px;
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--material-color) 12%, #071321),
    #09121f
  );
  text-align: center;
  min-width: 0;
}
.material-rarity-2 {
  --material-color: #53b798;
}
.material-rarity-3 {
  --material-color: #66c5ee;
}
.material-rarity-4 {
  --material-color: #a99ae1;
}
.material-rarity-5 {
  --material-color: #d9b467;
}
.material-art {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 12px;
  background: #050d1780;
  margin-bottom: 12px;
}
.material-art img {
  object-fit: contain;
}
.material-count {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.material-name {
  font-size: 11px;
  line-height: 1.5;
  color: #c0cfe0;
  margin-top: 6px;
}
.material-talent-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 22px 0;
}
.material-talent-control .range-heading {
  margin-top: 0;
}
.reference-material-panel > .section-heading h2 {
  margin-top: 8px;
}
.reference-material-panel > .section-heading {
  flex-wrap: wrap;
  gap: 12px;
}
.material-empty {
  padding: 20px 0 8px;
}
@media (max-width: 640px) {
  .material-talent-controls {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .material-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
.talent-icon img {
  object-fit: contain;
}
.constellation-number:has(img) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  width: 56px;
  height: auto;
  min-height: 68px;
  padding: 8px;
  border-radius: 16px;
}
.constellation-number img {
  object-fit: contain;
}

/* Furina's complete wish artwork gets its own spacious stage. */
.hero-grand {
  min-height: 520px;
  padding: 48px;
  background: radial-gradient(ellipse at 77% 45%, #244d7acc, transparent 65%), #0c1d33;
}
.hero-grand:before {
  z-index: 2;
  background: linear-gradient(90deg, #0c1d33 0%, #0c1d33ef 29%, #0c1d3300 59%);
}
/* The picture lays out the artwork; only the image itself is feathered. */
.hero-grand .hero-text { width: 43%; }
.hero-grand .hero-art {
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  filter: none;
  opacity: 1;
}
.hero-grand .hero-art img {
  display: block;
  position: absolute;
  width: 84%;
  height: auto;
  max-height: 100%;
  right: -10%;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  object-fit: contain;
  object-position: center;
  /* Alpha stops ease the actual image perimeter into the stage background. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 9%, #000 70%, #000000e6 79%, #00000080 89%, #00000026 97%, transparent 100%), linear-gradient(to right, transparent 0%, #000 10%, #000 91%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 9%, #000 70%, #000000e6 79%, #00000080 89%, #00000026 97%, transparent 100%), linear-gradient(to right, transparent 0%, #000 10%, #000 91%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.hero-grand .hero-stage {
  top: 50%;
  right: 9%;
  width: 42%;
  height: calc(100% - 56px);
  transform: translateY(-50%);
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
.hero-grand .hero-art-label { right: 25px; bottom: 22px; padding: 11px 15px; gap: 11px; }
.hero-grand .hero-footnote { display: flex; }
@media (max-width: 1250px) {
  .wordmark { font-size: 34px; }
  .hero-grand { min-height: 490px; padding: 35px; }
  .hero-grand .hero-text { width: 48%; }
  .hero-grand .hero-art img { width: 93%; right: -16%; }
}
@media (max-width: 900px) {
  .wordmark { font-size: 32px; white-space: nowrap; }
  .hero-grand {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 0 28px 32px;
  }
  .hero-grand { background: radial-gradient(ellipse 100% 340px at 60% 140px, #244d7a99, transparent), #0c1d33; }
  .hero-grand:before { display: none; }
  .hero-grand .hero-art {
    position: relative;
    order: -1;
    inset: auto;
    width: calc(100% + 56px);
    height: clamp(240px, 42vw, 350px);
    aspect-ratio: auto;
    margin: 0 -28px;
    object-fit: contain;
  }
  .hero-grand .hero-art img {
    position: static;
    transform: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 12%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 5%, #000 66%, #000000e6 76%, #00000080 88%, #00000026 96%, transparent 100%), linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 16px), transparent);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 5%, #000 66%, #000000e6 76%, #00000080 88%, #00000026 96%, transparent 100%), linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  }
  .hero-grand .hero-text { width: 100%; }
  .hero-grand h2 { margin: 12px 0 18px; }
  .hero-grand p { max-width: 430px; }
  .hero-grand .hero-art-label { position: relative; right: auto; bottom: auto; align-self: flex-end; margin-top: 24px; }
  .hero-grand .hero-art-label small { display: block; }
  .hero-grand .hero-stage { top: 15px; right: 17%; width: 60%; height: clamp(220px, 42vw, 330px); opacity: 0.25; transform: none; }
}
@media (max-width: 640px) {
  .wordmark { font-size: 29px; letter-spacing: -0.5px; gap: 4px; }
  .wordmark span { display: inline; }
  .topbar { flex-wrap: wrap; height: auto; min-height: 100px; padding: 14px 15px; gap: 10px; }
  .mode-switch { order: 3; width: 100%; }
  .mode-switch a { flex: 1; justify-content: center; }
  .topbar-right { margin-left: auto; }
  .hero-grand { padding: 0 20px 25px; }
  .hero-grand .hero-art { width: calc(100% + 40px); margin: 0 -20px 16px; }
  .hero-grand h2 { font-size: 54px; }
  .hero-grand .hero-footnote { flex-wrap: wrap; gap: 8px; font-size: 7px; letter-spacing: 1px; }
  .hero-grand .hero-art-label { padding: 10px 12px; align-self: flex-start; width: 100%; max-width: 100%; gap: 8px; }
  .hero-grand .hero-art-label > svg { flex-shrink: 0; margin-left: auto; }
  .hero-grand .hero-art-label small { font-size: 9px; letter-spacing: 0.4px; }
}

.character-archive .reference-text { white-space: pre-line; }
.archive-entry { padding: 18px 0; border-bottom: 1px solid var(--border); }
.archive-entry:last-child { border-bottom: 0; }
.archive-entry > summary { cursor: pointer; color: var(--text); font-weight: 600; font-size: 14px; line-height: 1.5; }
.archive-entry .reference-text { margin: 18px 0 0; max-width: 900px; }
.archive-unlock { color: var(--gold); font-size: 11px; line-height: 1.7; margin-top: 14px; }
.archive-alternate { margin-top: 18px; padding: 15px; border: 1px solid var(--border); border-radius: 10px; }
.archive-alternate > summary { color: var(--muted); cursor: pointer; font-size: 12px; }
.archive-search { max-width: 460px; margin: 0 0 5px; }
.traveler-form { max-width: 300px; margin: 18px 0; }
.archive-entry[hidden] { display: none; }

/* Regular cards read name, rarity, attributes, then region. */
.character-card:not(.character-card-featured) .character-meta h3 { font-size: 12px; font-weight: 700; color: #f1f4f8; margin-bottom: 6px; }
.character-card:not(.character-card-featured) .character-meta .stars { margin: 0 0 9px; font-size: 11px; letter-spacing: 1.3px; color: #e3c17c; }
.character-card:not(.character-card-featured) .character-meta > p { font-size: 10px; font-weight: 450; line-height: 1.5; color: #b7c7dd; }
.character-card:not(.character-card-featured) .character-region { margin-top: 11px; font-size: 9px; letter-spacing: .2px; color: #98aac1; }

.catalog-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 22px; }
.catalog-heading h1 { margin: 0; font-size: 29px; line-height: 1.2; font-weight: 650; letter-spacing: -1px; }
.catalog-heading .muted { font-size: 10px; }
@media (max-width: 640px) { .catalog-heading h1 { font-size: 25px; } }

/* Unboxed character filters: a search row followed by compact, wrapping groups. */
.catalog-filter-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 24px;
}
.catalog-filter-top { display: flex; align-items: center; gap: 16px; }
.catalog-search-label { display: block; flex: 1; min-width: 0; }
.catalog-search-caption { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.catalog-filter-panel .search-box { width: 100%; min-width: 0; height: 38px; }
.catalog-filter-panel .search-box input { font-family: var(--font); font-size: 13px; font-weight: 500; }
.catalog-filter-panel .search-box input::placeholder { color: #94a7be; }
.catalog-reset { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 8px 0 8px 8px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11px; white-space: nowrap; cursor: pointer; }
.catalog-reset svg { width: 15px; height: 15px; }
.catalog-reset:hover { color: var(--accent-bright); }
.catalog-reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.catalog-sort, .catalog-filter-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 7px; background: #102037; color: #e3eaf3; font: 600 13px var(--font); cursor: pointer; }
.catalog-sort { flex: 0 0 38px; padding: 0; }
.catalog-sort svg, .catalog-filter-toggle svg { width: 17px; height: 17px; }
.catalog-sort .sort-ascending { transform: rotate(180deg); }
.catalog-filter-toggle { flex: 0 0 142px; justify-content: flex-start; }
.catalog-filter-toggle .filter-chevron { margin-left: auto; width: 13px; transition: transform .15s; }
.catalog-filter-toggle[aria-expanded="true"] .filter-chevron { transform: rotate(90deg); }
.catalog-filter-toggle.has-filters, .catalog-filter-toggle[aria-expanded="true"] { border-color: #537b9b; color: #c3ebff; }
.catalog-sort:hover, .catalog-filter-toggle:hover { background: #1a344e; }
.catalog-sort:focus-visible, .catalog-filter-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.catalog-filter-panel { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.catalog-filter-groups { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 32px; }
.catalog-filter-groups[hidden] { display: none; }
.catalog-region-group { flex-basis: 100%; }
.catalog-filter-group { flex: 0 0 auto; border: 0; padding: 0; margin: 0; min-width: 0; max-width: 100%; }
.catalog-filter-group legend { float: none; padding: 0; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: #b7c9de; }
.catalog-filter-options { display: flex; flex-wrap: wrap; gap: 5px; }
.catalog-filter-options .filter { padding: 6px 9px; min-height: 34px; font-family: var(--font); font-size: 13px; font-weight: 600; background: transparent; border-color: transparent; color: #e3eaf3; }
.catalog-filter-options .filter:hover { background: #11243a; color: var(--text); }
.catalog-filter-options .filter.active { background: #1a344e; border-color: #365572; color: #e0f4ff; }
.rating-star { color: var(--gold); }
@media (min-width: 1600px) {
  .catalog-filter-group + .catalog-filter-group:not(.catalog-region-group) { border-left: 1px solid var(--border); padding-left: 24px; }
}
@media (max-width: 640px) {
  .catalog-filter-top { gap: 10px; }
  .catalog-filter-top { flex-wrap: wrap; }
  .catalog-filter-toggle { flex: 1; }
  .catalog-search-label { flex-basis: 100%; order: 1; }
  .catalog-filter-panel { gap: 12px; }
  .catalog-filter-groups { display: grid; gap: 14px; }
  .catalog-filter-options .filter { padding: 7px 8px; min-height: 36px; }
  .catalog-filter-panel kbd { display: none; }
}

.character-region { display: flex; align-items: center; }
.character-region img { width: 24px; height: 24px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.8; }

/* Equipment art stays contained; only the image edges blend into the card. */
.weapon-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,260px),1fr)); gap: 14px; }
.weapon-card { position: relative; display: grid; grid-template-columns: 42% minmax(0,1fr); column-gap: 8px; align-items: center; min-height: 174px; padding: 0 12px 0 0; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #112137; color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; }
.weapon-card[data-rarity="5"], .weapon-profile-summary[data-rarity="5"] { border-color: #a78b4d; background: #2b261e; }
.weapon-card[data-rarity="4"], .weapon-profile-summary[data-rarity="4"] { border-color: #8262a0; background: #1d2137; }
.weapon-card:hover { background: #22324a; border-color: #c8dff3; }
.weapon-card[data-rarity="5"]:not(.weapon-card-featured):hover { background: #382e20; border-color: #e4c384; }
.weapon-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.weapon-card-art { position: relative; align-self: stretch; display: flex; align-items: center; justify-content: center; }
.weapon-card-art > img {
  display: block; width: min(100%, 180px); height: auto; object-fit: contain;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 76%, #000b 88%, transparent), linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 76%, #000b 88%, transparent), linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.weapon-type-icon { position: absolute; top: 10px; left: 10px; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: #0b1829; }
.weapon-type-icon img { width: 17px; height: 17px; object-fit: contain; }
.weapon-card-meta h3 { margin: 0 0 7px; font-size: 13px; line-height: 1.35; font-weight: 700; color: #f1f4f8; }
.weapon-card-meta { padding: 10px 0; }
.weapon-card-meta .stars { margin: 0 0 9px; font-size: 11px; letter-spacing: 1.3px; color: #e3c17c; }
.weapon-card-type { margin: 0 0 11px; font-size: 10px; color: #b7c7dd; }
.weapon-card-stats { display: flex; flex-wrap: wrap; gap: 7px 14px; }
.weapon-stat-label { display: block; font-size: 9px; line-height: 1.3; color: #98aac1; }
.weapon-card-stats strong { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; color: #dcebf6; }
.weapon-card-level { display: block; margin-top: 8px; font-size: 9px; color: #98aac1; }
.weapon-collection-note { margin: 16px 0 0; font-size: 10px; line-height: 1.6; color: var(--muted); }
.weapon-profile { display: grid; grid-template-columns: minmax(240px,1fr) minmax(0,1.6fr); gap: 20px; align-items: start; }
.weapon-profile-art { display: block; width: 100%; height: 240px; object-fit: contain; }
.weapon-profile-summary > .stars { margin: 10px 0; color: var(--gold); }
.weapon-profile-summary > p:not(.reference-text):not(.reference-note) { font-size: 12px; color: var(--muted); }
.weapon-profile-summary .reference-text { margin-bottom: 20px; }
.weapon-passive-title { margin: 12px 0 20px; }
.weapon-story { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; }
.weapon-story summary { cursor: pointer; font-weight: 600; color: #dcebf6; }
.weapon-story p { margin-top: 16px; white-space: pre-line; }
@media (min-width: 1200px) {
  .weapon-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .weapon-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .weapon-card { grid-template-columns: minmax(0,1fr); padding: 0; align-content: start; }
  .weapon-card-art { height: 116px; }
  .weapon-card-art > img { width: auto; max-width: 100%; max-height: 116px; }
  .weapon-card-meta { padding: 10px 10px; margin: 0; }
  .weapon-card-meta h3 { font-size: 12px; }
  .weapon-card-stats { gap: 7px 10px; }
  .weapon-profile { grid-template-columns: minmax(0,1fr); }
}
.weapon-card[data-rarity="3"], .weapon-profile-summary[data-rarity="3"] { border-color: #547fa4; background: #15273a; }
.weapon-card[data-rarity="2"], .weapon-profile-summary[data-rarity="2"] { border-color: #527864; background: #172a28; }
.weapon-card[data-rarity="1"], .weapon-profile-summary[data-rarity="1"] { border-color: #6e7782; background: #20272f; }
.weapon-card-meta h3 { overflow-wrap: anywhere; }

/* Splendor echoes Furina's featured card without adding another frame. */
.weapon-card-featured[data-rarity="5"] { border-color: #e4c384; background: #132a40; box-shadow: 0 3px 12px #070f1b40; }
.weapon-card-featured .weapon-card-meta { position: relative; }
.weapon-card-featured .weapon-type-icon { border-color: #e4c384; }
.weapon-card-featured:is(:hover, :focus-visible), .weapon-card-featured:is(:hover, :focus-visible) .weapon-type-icon { border-color: #fff0c8; }
.weapon-card-featured .weapon-card-meta h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin-bottom: 8px; }
.weapon-signature-name { display: block; font-size: 25px; color: #f3f4f6; }
.weapon-signature-suffix { display: block; margin-top: 3px; font-size: 14px; font-style: italic; color: #e4c384; }
.weapon-card-featured .stars-glisten { letter-spacing: 0; }
.weapon-card-featured .weapon-card-type, .weapon-card-featured .weapon-card-stats strong { color: #cceeff; }
.weapon-card-featured .weapon-stat-label, .weapon-card-featured .weapon-card-level { color: #b4c7de; }
@media (max-width: 640px) {
  .weapon-signature-name { font-size: 23px; }
  .weapon-signature-suffix { font-size: 13px; }
}
.weapon-card-featured .card-namecard img { object-position: 60% center; }
.weapon-card-featured .card-namecard::after { background: linear-gradient(90deg, #0b1a2d45, #0b1a2d70 43%, #0b1a2db8 68%, #0b1a2dcc); }

/* Artifact sets use the equipment catalog hierarchy with genuine rarity ranges. */
.artifact-set-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,260px),1fr)); gap: 14px; align-items: start; }
.artifact-set-card { position: relative; min-height: 140px; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #112137; color: var(--text); transition: border-color .15s, background .15s; }
.artifact-set-header { position: relative; display: grid; grid-template-columns: 40% minmax(0,1fr); gap: 8px; align-items: center; min-height: 112px; padding-right: 12px; }
.artifact-set-card[data-rarity="5"], .artifact-set-effects[data-rarity="5"] { border-color: #a78b4d; background: #2b261e; }
.artifact-set-card[data-rarity="4"], .artifact-set-effects[data-rarity="4"] { border-color: #8262a0; background: #1d2137; }
.artifact-set-card[data-rarity="3"], .artifact-set-effects[data-rarity="3"] { border-color: #547fa4; background: #15273a; }
.artifact-set-card:hover { background: #22324a; border-color: #c8dff3; }
.artifact-set-card[data-rarity="5"]:not(.artifact-set-featured):hover { background: #382e20; border-color: #e4c384; }
.artifact-set-card:focus-within { border-color: #c8dff3; }
.artifact-set-card a:focus-visible, .artifact-card-effects summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.artifact-set-art { position: relative; display: flex; align-items: center; justify-content: center; padding: 6px 0; }
.artifact-set-art > a { display: block; width: min(100%,100px); }
.artifact-set-art img { display: block; width: 100%; height: auto; object-fit: contain; }
.artifact-set-meta { position: relative; min-width: 0; padding: 12px 0; }
.artifact-set-meta h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; line-height: 1.35; color: #f1f4f8; overflow-wrap: anywhere; }
.artifact-set-meta h3 a { color: inherit; text-decoration: none; }
.artifact-set-meta h3 a:hover { color: #cceeff; }
.artifact-card-effects { position: relative; border-top: 1px solid #ffffff12; }
.artifact-card-effects summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; padding: 4px 12px; color: #b4c7de; font-size: 10px; font-weight: 600; cursor: pointer; list-style: none; }
.artifact-card-effects summary::-webkit-details-marker { display: none; }
.artifact-card-effects summary:hover { color: #e4c384; background: #ffffff05; }
.artifact-effects-chevron { display: block; width: 12px; height: 12px; flex: 0 0 12px; transform-origin: center; transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.artifact-card-effects[open] .artifact-effects-chevron { transform: rotate(90deg); }
.artifact-card-effect-body { padding: 6px 14px 14px; background: #081321cc; }
.artifact-card-effect-body section + section { margin-top: 14px; }
.artifact-card-effect-body h4 { margin: 0 0 6px; font-size: 10px; font-weight: 600; color: #e4c384; }
.artifact-card-effect-body p { margin: 0; font-size: 11px; line-height: 1.65; color: #d1deec; white-space: pre-line; }
.artifact-rarities { display: flex; flex-wrap: wrap; gap: 7px; font-size: 11px; font-weight: 600; }
.artifact-rarities span[data-rarity="1"] { color: #b4beca; }
.artifact-rarities span[data-rarity="2"] { color: #9cceb0; }
.artifact-rarities span[data-rarity="3"] { color: #8dbde5; }
.artifact-rarities span[data-rarity="4"] { color: #c4a2e6; }
.artifact-rarities span[data-rarity="5"] { color: #e3c17c; }
.artifact-card-stars { display: flex; gap: 2px; color: #dfc17d; font-size: 12px; line-height: 1.4; }
.artifact-collection-note { margin: 16px 0 0; font-size: 10px; line-height: 1.6; color: var(--muted); }
.artifact-set-featured[data-rarity="5"] { border-color: #e4c384; background: #132a40; box-shadow: 0 3px 12px #070f1b40; }
.artifact-set-featured:is(:hover,:focus-visible) { border-color: #fff0c8; }
.artifact-set-featured .card-namecard img { object-position: 50% center; }
.artifact-set-featured .artifact-set-meta h3 { font-family: var(--font-display); font-size: 23px; font-weight: 600; line-height: 1.1; }
.artifact-golden-word { color: #dfc17d; animation: artifact-golden-glow 8s ease-in-out infinite; }
@keyframes artifact-golden-glow {
  0%, 25%, 100% { color: #dfc17d; text-shadow: 0 0 3px #e6bd6920; }
  12% { color: #fff0bc; text-shadow: 0 0 5px #ffe5aa99, 0 0 12px #e6bd6955; }
}
@media (prefers-reduced-motion: reduce) {
  .artifact-golden-word { animation: none; text-shadow: none; }
}
.artifact-profile { display: grid; grid-template-columns: minmax(240px,1fr) minmax(0,1.7fr); gap: 20px; align-items: start; }
.artifact-profile-art { display: block; width: 100%; height: 180px; object-fit: contain; }
.artifact-set-effects h2 { margin-top: 20px; }
.artifact-effect { margin-top: 20px; }
.artifact-effect h3 { color: #e4c384; font-size: 13px; margin-bottom: 9px; }
.artifact-pieces { display: grid; gap: 14px; min-width: 0; }
.artifact-pieces > h2 { margin: 0 0 4px; }
.artifact-piece-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.artifact-piece-heading > img { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; }
.artifact-piece-heading h3 { margin: 7px 0 0; font-size: 17px; }
.artifact-piece-heading .eyebrow { font-size: 9px; }
.artifact-piece-story { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.artifact-piece-story summary { cursor: pointer; font-size: 12px; font-weight: 600; color: #dcebf6; }
.artifact-piece-story p { margin-top: 16px; white-space: pre-line; }
@media (min-width: 1200px) {
  .artifact-set-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .artifact-set-card:has(.artifact-card-effects[open]) { grid-column: span 2; }
  .artifact-set-card:has(.artifact-card-effects[open]) .artifact-set-header { grid-template-columns: 120px minmax(0,1fr); }
}
@media (max-width: 640px) {
  .artifact-set-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .artifact-set-header { grid-template-columns: minmax(0,1fr); padding: 0; gap: 0; }
  .artifact-set-art { height: 100px; padding: 0 10px; }
  .artifact-set-art > a { width: auto; max-width: 100%; }
  .artifact-set-art img { width: auto; max-width: 100%; max-height: 100px; }
  .artifact-set-meta { padding: 10px; }
  .artifact-set-meta h3 { font-size: 12px; }
  .artifact-set-featured .artifact-set-meta h3 { font-size: 21px; }
  .artifact-set-card:has(.artifact-card-effects[open]) { grid-column: span 2; }
  .artifact-set-card:has(.artifact-card-effects[open]) .artifact-set-header { grid-template-columns: 90px minmax(0,1fr); }
  .artifact-profile { grid-template-columns: minmax(0,1fr); }
  .artifact-piece-heading { gap: 10px; }
  .artifact-piece-heading > img { width: 55px; height: 55px; }
  .artifact-piece-heading h3 { font-size: 15px; }
}

/* Character profiles: the catalog palette, with room for reading and progression. */
.character-profile-page { --profile-accent: #70b7ec; --profile-surface: #152d40; }
.character-profile-page[data-element="Pyro"] { --profile-surface: #352421; }
.character-profile-page[data-element="Anemo"] { --profile-surface: #193731; }
.character-profile-page[data-element="Electro"] { --profile-surface: #2d2541; }
.character-profile-page[data-element="Dendro"] { --profile-surface: #28351f; }
.character-profile-page[data-element="Cryo"] { --profile-surface: #20343b; }
.character-profile-page[data-element="Geo"] { --profile-surface: #352e20; }
.character-profile-page .breadcrumb { display: flex; gap: 16px; margin-bottom: 22px; font-size: 12px; }
.character-profile-page .breadcrumb a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.character-profile-page .breadcrumb > span { border-left: 1px solid var(--border); padding-left: 16px; color: var(--muted); }
.profile-back-chevron { transform: rotate(180deg); }
.character-profile-page .character-profile-hero { display: grid; grid-template-columns: minmax(230px,.8fr) minmax(0,1.2fr); gap: 40px; min-height: 350px; padding: 0 48px 0 20px; border-radius: 16px; border-color: #a78b4d; background: linear-gradient(110deg,var(--profile-surface),#0d192b 80%); }
.character-profile-page[data-rarity="4"] .character-profile-hero { border-color: #8262a0; }
.character-profile-page.character-profile-featured .detail-portrait { object-fit: cover; object-position: center 26%; }
.profile-art { position: relative; z-index: 1; display: flex; justify-content: center; align-items: end; align-self: stretch; min-width: 0; }
.character-profile-page .detail-portrait { position: relative; right: auto; bottom: auto; opacity: 1; display: block; width: min(100%,360px); height: 340px; margin: 0; object-fit: contain; object-position: center bottom; mask-image: linear-gradient(to bottom,#000 80%,transparent 100%); }
.profile-namecard { position: absolute; inset: 0; pointer-events: none; }
.profile-namecard img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .45; }
.profile-namecard::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,#0b1a2d10,#0b1a2d88 45%,#0b1a2df2); }
.profile-region-emblem { position: absolute; right: -35px; top: 50%; transform: translateY(-50%); width: 340px; height: 340px; object-fit: contain; opacity: .055; pointer-events: none; }
.character-profile-page .detail-copy { width: 100%; max-width: 650px; padding: 34px 0; }
.profile-title { color: var(--profile-accent); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 12px; line-height: 1.5; }
.character-profile-page .detail-copy h1 { margin: 0 0 12px; font-size: clamp(36px,4vw,56px); font-weight: 700; line-height: 1.05; letter-spacing: -1.3px; overflow-wrap: anywhere; }
.character-profile-featured .detail-copy h1 { font-family: var(--font-display); font-size: clamp(56px,6vw,80px); font-weight: 600; letter-spacing: -.7px; }
.character-profile-featured .detail-copy h1 em { display: block; margin-top: 3px; color: var(--gold); font-size: .43em; font-weight: 600; letter-spacing: 0; }
.character-profile-page .detail-copy .stars { margin: 0 0 16px; font-size: 15px; letter-spacing: 2px; }
.character-profile-page .detail-copy .stars-glisten { letter-spacing: 0; gap: 4px; }
.profile-attributes { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; font-weight: 600; color: #d2e0ed; }
.profile-attributes > span { display: inline-flex; align-items: center; gap: 7px; }
.profile-attributes img { width: 20px; height: 20px; object-fit: contain; }
.profile-attributes .profile-attribute-dot { color: var(--profile-accent); }
.profile-attributes .profile-region { border-left: 1px solid #ffffff25; padding-left: 14px; margin-left: 4px; font-weight: 500; color: #a8bed0; }
.character-profile-page .detail-copy .description { max-width: 520px; font-size: 13px; color: #b4c7db; line-height: 1.8; margin: 18px 0 22px; }
.character-profile-page .profile-build-link { background: #e3d2ad; color: #102037; padding: 11px 17px; font-size: 12px; border-radius: 8px; }
.character-profile-page .profile-build-link:hover { background: #f2e4c8; }
.character-profile-page .tabs { gap: 8px; padding: 8px; margin: 20px 0 24px; border: 1px solid var(--border); border-radius: 12px; background: #0d192b; overflow-x: auto; }
.character-profile-page .tab { flex-shrink: 0; justify-content: center; gap: 8px; padding: 12px 18px; border: 1px solid transparent; border-radius: 7px; font-size: 13px; font-weight: 600; }
.character-profile-page .tab:hover { color: #e0edf5; background: #ffffff05; }
.character-profile-page .tab.active { color: #e7f3fb; background: #1b354b; border-color: #3b5f7c; }
.character-profile-page .tab:focus-visible { outline: 2px solid var(--profile-accent); outline-offset: -2px; }
.character-profile-page .reference-provenance { gap: 12px; font-size: 10px; margin: 0 0 22px; }
.character-profile-page .reference-provenance > .badge { border: 0; padding-left: 0; background: transparent; color: #a8bfd1; font-size: 10px; }
.character-profile-page .reference-provenance > a { font-size: 10px; color: #8ea6bc; }
.character-profile-page .overview-layout { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 20px; }
.character-profile-page .panel { min-width: 0; padding: 24px; background: #0d1928; border-color: #27394b; box-shadow: none; }
.character-profile-page .panel h2 { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.character-profile-page .panel > h2:first-child { margin-top: 0; }
.character-profile-page .reference-stat-grid { gap: 10px; }
.character-profile-page .reference-stat-tile { padding: 16px; background: #112235; border-color: #29415a; }
.character-profile-page .reference-stat-tile strong { color: #e5eff5; font-size: 27px; font-weight: 700; font-variant-numeric: tabular-nums; }
.character-profile-page .reference-stat-tile span { font-size: 11px; line-height: 1.5; }
.character-profile-page .stat-list div { gap: 18px; font-size: 12px; line-height: 1.6; }
.character-profile-page .stat-list dd { text-align: right; overflow-wrap: anywhere; }
.character-profile-page .content-text { font-size: 13px; }
.character-profile-page .reference-material-panel { margin-top: 20px; }
.character-profile-page .reference-material-panel .eyebrow { color: var(--profile-accent); font-size: 10px; }
.character-profile-page .talent-head { align-items: center; padding-bottom: 16px; border-bottom: 1px solid #ffffff12; margin-bottom: 16px; }
.character-profile-page .talent-icon { width: 48px; height: 48px; flex: 0 0 48px; border: 1px solid #a78b4d80; border-radius: 12px; background: var(--profile-surface); }
.character-profile-page .talent-icon img { width: 32px; height: 32px; object-fit: contain; }
.character-profile-page .talent-head h3 { font-size: 17px; font-weight: 700; line-height: 1.35; }
.character-profile-page .talent-head p { color: var(--profile-accent); font-size: 11px; margin-top: 5px; }
.character-profile-page .talent-description, .character-profile-page .reference-text { font-size: 13px; line-height: 1.85; color: #b7c8da; }
.character-profile-page .multiplier-table td { font-size: 12px; padding: 11px 12px; }
.character-profile-page .multiplier-table td:last-child { color: #e1d1aa; font-weight: 600; font-variant-numeric: tabular-nums; }
.character-profile-page .constellation-list { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch; gap: 14px; }
.character-profile-page .constellation-item { display: block; padding: 18px; }
.character-profile-page .constellation-heading { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 12px; align-items: center; margin-bottom: 14px; }
.character-profile-page .constellation-item h3 { margin: 0 0 4px; color: #e2c78f; font-size: 15px; line-height: 1.4; }
.character-profile-page .constellation-icon-frame { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #a78b4d40; border-radius: 9px; background: var(--profile-surface); }
.character-profile-page .constellation-icon-frame img { display: block; width: 28px; height: 28px; object-fit: contain; }
.character-profile-page .constellation-index { display: block; font-size: 11px; font-weight: 500; line-height: 1.4; color: #a9bfd3; }
.character-profile-page .constellation-copy { min-width: 0; }
.character-profile-page .constellation-item .reference-text { margin: 0; overflow-wrap: anywhere; }
.character-profile-page .archive-entry { padding: 16px 18px; border: 1px solid #27394b; border-radius: 10px; background: #102033; margin-top: 10px; }
.character-profile-page .archive-entry[open] { background: #112439; border-color: #45627c; }
.character-profile-page .archive-entry > summary { font-size: 14px; }
.character-profile-page .archive-entry .reference-text { max-width: 800px; }
@media (max-width: 1000px) {
 .character-profile-page .character-profile-hero { gap: 24px; padding-right: 28px; grid-template-columns: minmax(190px,.8fr) minmax(0,1.2fr); }
 .character-profile-page .overview-layout, .character-profile-page .constellation-list { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 640px) {
 .character-profile-page .character-profile-hero { grid-template-columns: minmax(0,1fr); gap: 0; padding: 0 22px; }
 .profile-art { height: 220px; margin: 0 -22px; }
 .character-profile-page .detail-portrait { width: auto; max-width: 100%; height: 240px; align-self: end; }
 .character-profile-featured .detail-portrait { width: 260px; }
 .character-profile-page .detail-copy { padding: 14px 0 24px; }
 .character-profile-page .detail-copy h1 { font-size: 38px; }
 .character-profile-featured .detail-copy h1 { font-size: 60px; }
 .profile-title { font-size: 10px; }
 .profile-region-emblem { width: 270px; height: 270px; top: 30%; }
 .profile-namecard::after { background: linear-gradient(to bottom,#0b1a2d20,#0b1a2d55 30%,#0b1a2deb 65%); }
 .character-profile-page .tabs { gap: 3px; padding: 5px; }
 .character-profile-page .tab { padding: 11px 12px; font-size: 12px; }
 .character-profile-page .panel { padding: 18px; }
 .character-profile-page .panel h2 { font-size: 18px; }
 .character-profile-page .reference-stat-tile { padding: 12px; }
 .character-profile-page .reference-stat-tile strong { font-size: 22px; }
 .character-profile-page .reference-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .character-profile-page .reference-provenance { gap: 8px; }
}

/* Continuous character reference: simple values use rows, substantial entries use cards. */
.character-profile-page { --profile-nav-top: 90px; }
.profile-section-nav { position: sticky; top: var(--profile-nav-top); z-index: 10; display: flex; gap: 4px; overflow-x: auto; margin: 18px 0 22px; padding: 8px 0; border-bottom: 1px solid #32495d; background: #070f1cf5; backdrop-filter: blur(12px); }
.profile-section-link { display: inline-flex; flex-shrink: 0; align-items: center; gap: 8px; padding: 10px 15px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #a1b7cb; font-size: 12px; font-weight: 600; cursor: pointer; }
.profile-section-icon { display: block; width: 20px; height: 20px; flex: 0 0 20px; object-fit: contain; opacity: .72; }
.profile-section-link:is(.active,:hover,:focus-visible) .profile-section-icon { opacity: 1; }
.profile-section-link:hover { color: #e0edf5; background: #ffffff05; }
.profile-section-link.active { color: #e7f3fb; background: #1b354b; border-color: #3b5f7c; }
.profile-section-link:focus-visible { outline: 2px solid var(--profile-accent); outline-offset: -2px; }
.profile-section { scroll-margin-top: calc(var(--profile-nav-top) + 76px); padding: 30px 0; border-top: 1px solid #25394c; }
.profile-section:first-of-type { border-top: 0; padding-top: 0; }
.profile-section:focus { outline: none; }
.character-profile-page .profile-section .overview-layout { gap: 48px; }
.character-profile-page .profile-section .overview-layout > .panel,
.character-profile-page .profile-section .reference-material-panel,
.character-profile-page .profile-section > .character-archive { border: 0; border-radius: 0; background: transparent; padding: 0; }
.character-profile-page .reference-stat-grid { display: block; }
.character-profile-page .reference-stat-tile { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 8px 0; border: 0; border-bottom: 1px solid #ffffff0c; border-radius: 0; background: transparent; }
.character-profile-page .reference-stat-tile:last-child { border-bottom: 0; }
.character-profile-page .reference-stat-tile span { margin: 0; color: #b2c4d5; font-size: 12px; }
.character-profile-page .reference-stat-tile strong { flex-shrink: 0; font-size: 16px; line-height: 1.4; font-weight: 700; }
.character-profile-page .reference-level-controls { margin: 16px 0; }
.character-profile-page .profile-section .reference-material-panel { margin: 0; }
.character-profile-page .profile-section .reference-material-panel + .reference-material-panel { border-top: 1px solid #ffffff10; margin-top: 28px; padding-top: 28px; }
.character-profile-page .profile-section > .section-heading { margin-bottom: 14px; }
.character-profile-page .archive-entry { border: 0; border-bottom: 1px solid #ffffff12; border-radius: 0; background: transparent; margin: 0; padding: 18px 0; }
.character-profile-page .archive-entry[open] { border-color: #45627c; background: transparent; }
@media (max-width: 1000px) {
 .character-profile-page .profile-section .overview-layout { gap: 28px; }
}
@media (max-width: 640px) {
 .profile-section-nav { gap: 2px; margin-top: 14px; }
 .profile-section-link { padding: 10px; font-size: 11px; gap: 6px; }
 .profile-section { padding: 24px 0; }
 .character-profile-page .reference-stat-tile { padding: 10px 0; }
 .character-profile-page .reference-stat-tile strong { font-size: 16px; }
}



/* Character progression: materials beside the range being planned. */
.material-progression-layout { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,1fr); gap: 44px; align-items: start; }
.material-results { min-width: 0; }
.material-range-summary { color: #9bb8ce; font-size: 11px; margin: 0 0 16px; }
#profile-section-materials .material-cards { grid-template-columns: repeat(auto-fill,minmax(86px,1fr)); gap: 9px; }
#profile-section-materials .material-card { padding: 8px 5px; border-radius: 10px; }
#profile-section-materials .material-art { height: 58px; width: 100%; margin: 0 0 6px; }
#profile-section-materials .material-art img { width: 58px; height: 58px; }
#profile-section-materials .material-count { font-size: 12px; white-space: nowrap; }
#profile-section-materials .material-name { font-size: 10px; line-height: 1.35; }
.material-range-controls { border: 0; padding: 0; margin: 0; min-width: 0; }
.material-range-controls legend { display: flex; gap: 10px; align-items: center; padding: 0; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.material-range-controls legend img { object-fit: contain; }
.material-range-controls legend small { display: block; font-size: 10px; font-weight: 400; color: #95adc2; margin-top: 4px; }
.material-endpoint { margin-bottom: 20px; }
.material-endpoint .range-heading { margin: 0 0 9px; font-size: 11px; }
.material-endpoint output { color: var(--profile-accent); font-variant-numeric: tabular-nums; }
.material-endpoint select { width: 100%; padding: 8px 10px; margin-top: 8px; background: #0a1421; color: #b9cde0; border: 1px solid var(--border); border-radius: 6px; font-size: 11px; }
#profile-section-materials .material-talent-controls { grid-template-columns: minmax(0,1fr); gap: 24px; margin: 0; }
.character-profile-page .profile-section .profile-overview-balanced { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); }
.profile-identity-column, .profile-stats-column { min-width: 0; }
.character-profile-page .profile-overview-balanced .character-profile-hero { grid-template-columns: minmax(0,.8fr) minmax(0,1fr); gap: 14px; padding: 0 24px 0 0; min-height: 390px; margin: 0; }
.character-profile-page .profile-overview-balanced .detail-copy { padding: 26px 0; }
.character-profile-page .profile-overview-balanced .detail-copy h1 { font-size: clamp(32px,3vw,52px); }
.character-profile-page.character-profile-featured .profile-overview-balanced .detail-copy h1 { font-size: clamp(44px,4vw,64px); }
.character-profile-page .profile-personal-details { margin-top: 16px; }
.character-profile-page .profile-voice-cast { margin-top: 24px; }
@media (max-width: 1050px) {
 .material-progression-layout { grid-template-columns: minmax(0,1.2fr) minmax(250px,1fr); gap: 24px; }
 .character-profile-page .profile-section .profile-overview-balanced { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 640px) {
 .material-progression-layout { grid-template-columns: minmax(0,1fr); gap: 20px; }
 .material-range-controls, #profile-section-materials .material-talent-controls { order: -1; }
 .character-profile-page .profile-overview-balanced .character-profile-hero { grid-template-columns: minmax(0,1fr); padding: 0 22px; gap: 0; }
 .character-profile-page .profile-overview-balanced .detail-copy { padding-top: 12px; }
}
/* Nested overview columns keep the same unboxed rows as the continuous page. */
.character-profile-page .profile-overview-balanced .panel { background: transparent; border: 0; border-radius: 0; padding: 0; }
.character-profile-page .profile-personal-details { padding: 0 4px; }
#profile-section-materials .material-talent-control .material-endpoint { margin-bottom: 10px; }
#profile-section-materials .material-talent-control legend { margin-bottom: 12px; }
#profile-section-materials .material-talent-controls { gap: 18px; }
.character-profile-page .level-ascension-note { align-self: end; margin: 0 0 10px; }
/* Fixed thumb geometry keeps each milestone centered on its true travel position. */
:is([data-character-level-slider], [data-material-character-level]) { appearance: none; border: 0; border-radius: 2px; background: linear-gradient(to right,var(--accent) var(--level-progress,100%),#718092 var(--level-progress,100%)); }
:is([data-character-level-slider], [data-material-character-level])::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border: 2px solid #edf5fc; border-radius: 50%; background: #606b7b; }
:is([data-character-level-slider], [data-material-character-level])::-moz-range-thumb { width: 16px; height: 16px; border: 2px solid #edf5fc; border-radius: 50%; background: #606b7b; }
:is([data-character-level-slider], [data-material-character-level]).is-snapped::-webkit-slider-thumb { background: #b79757; box-shadow: 0 0 0 5px #d8bd8726; }
:is([data-character-level-slider], [data-material-character-level]).is-snapped::-moz-range-thumb { background: #b79757; box-shadow: 0 0 0 5px #d8bd8726; }
.character-range-limits { display: block; position: relative; height: 20px; margin-inline: 10px; color: #93a7bd; font-size: 9px; }
.character-range-limits span { position: absolute; transform: translateX(-50%); padding-top: 6px; }
.character-range-limits span::before { content: ''; position: absolute; top: 0; left: 50%; width: 1px; height: 4px; background: #677e94; }
.character-range-limits span.active { color: var(--gold); font-weight: 700; }
.character-range-limits span.active::before { background: var(--gold); height: 5px; }
/* The final two stops are special ascensions, set apart from normal leveling. */
:is([data-character-level-slider], [data-material-character-level]) { height: 4px; background: linear-gradient(to right,transparent 0 81.65%,#b9a5ea55 81.65% 100%),linear-gradient(to right,var(--accent) var(--level-progress,100%),#52657a var(--level-progress,100%)); }
:is([data-character-level-slider], [data-material-character-level]).special-ascension-selected { background: linear-gradient(to right,var(--accent) 0 81.65%,#baa6e9 81.65%,#eee4ff var(--level-progress),#645977 var(--level-progress)); }
:is([data-character-level-slider], [data-material-character-level]).special-ascension-selected::-webkit-slider-thumb { background: #c8b6ed; border-color: #fff2ff; box-shadow: 0 0 0 4px #bfa2ed20,0 0 14px #c4a6ef65; }
:is([data-character-level-slider], [data-material-character-level]).special-ascension-selected::-moz-range-thumb { background: #c8b6ed; border-color: #fff2ff; box-shadow: 0 0 0 4px #bfa2ed20,0 0 14px #c4a6ef65; }
.character-range-limits .special-level-marker { color: #c3afdf; }
.character-range-limits .special-level-marker::before { background: #ac8ed7; height: 6px; }
.character-range-limits .special-level-marker.active { color: #f2deff; text-shadow: 0 0 9px #c798ed90; }
/* Proportional scale, softly blended special section, and an animated visual thumb. */
.character-slider-motion { position: relative; height: 20px; margin: 8px 0 5px; }
.character-slider-motion .level-range { position: absolute; inset: 7px 0 auto; margin: 0; height: 6px; border-radius: 3px; background: linear-gradient(to right,transparent var(--level-progress),#8d9daf var(--level-progress)),linear-gradient(to right,var(--accent) 0 86%,#9cb9ef 89.9%,#bca7e9 94.9%,#eee4ff 100%); }
.character-slider-motion .level-range.special-ascension-selected { background: linear-gradient(to right,transparent var(--level-progress),#978aa9 var(--level-progress)),linear-gradient(to right,var(--accent) 0 86%,#9cb9ef 89.9%,#bca7e9 94.9%,#eee4ff 100%); }
.character-slider-motion .level-range::-webkit-slider-thumb { opacity: 0; }
.character-slider-motion .level-range::-moz-range-thumb { opacity: 0; }
.slider-visual-thumb { position: absolute; top: 0; width: 20px; height: 20px; border: 2px solid #edf5fc; border-radius: 50%; background: #606b7b; pointer-events: none; transform: translateX(-50%); }
.special-ascension-selected + .slider-visual-thumb { background: #c8b6ed; border-color: #fff2ff; box-shadow: 0 0 0 4px #bfa2ed20,0 0 14px #c4a6ef65; }
.is-snapped:not(.special-ascension-selected) + .slider-visual-thumb,
.at-milestone:not(.special-ascension-selected) + .slider-visual-thumb { background: #b79757; box-shadow: 0 0 0 4px #d8bd8726; }
.character-slider-motion .level-range:focus-visible + .slider-visual-thumb { outline: 2px solid var(--accent); outline-offset: 4px; }
.character-slider-motion .level-range:focus-visible { outline: none; }
/* Milestone dots link the intentionally spaced labels to the level rail. */
.character-range-limits span { padding-top: 10px; }
.character-range-limits span::before { height: 7px; }
.character-range-limits span.active::before { height: 7px; }
.slider-level-hint { position: absolute; right: 0; bottom: 27px; padding: 5px 8px; border: 1px solid #33475a; border-radius: 5px; background: #0c1929; color: #d6e6f3; font-size: 10px; white-space: nowrap; pointer-events: none; opacity: 0; }
.character-slider-motion:hover .slider-level-hint, .character-slider-motion:focus-within .slider-level-hint { opacity: 1; }
.character-level-heading { align-items: center; padding-bottom: 12px; border-bottom: 1px solid #ffffff16; margin-bottom: 16px; }
.character-level-heading > span { color: #edf3fa; font-size: 18px; font-weight: 650; }
.character-level-heading output { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 34px; padding: 4px 10px; border-radius: 10px; background: #17334a; color: #a7d8ff; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.character-level-heading:has(+ .character-slider-motion .special-ascension-selected) output { background: #2d2342; color: #dcc6ff; }
.material-endpoint .character-level-heading { margin-bottom: 14px; }
.material-endpoint .character-level-heading > span { font-size: 13px; }
.material-endpoint .character-level-heading output { font-size: 15px; min-height: 30px; }
/* Leave space for hover/focus hints without covering the persistent level badge. */
.character-slider-motion { margin-top: 34px; }
.slider-level-hint { bottom: 21px; }
.character-profile-page .profile-data-footer { display: block; margin: 36px 0 0; padding-top: 18px; border-top: 1px solid var(--border); }
.character-profile-page .profile-data-footer details { margin: 0; max-width: 740px; }
.character-profile-page .profile-data-footer summary { width: fit-content; color: var(--muted); }
.profile-data-metadata { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 16px; color: #9eb2c6; }
.profile-stats-column > .panel:first-child > .character-level-heading { margin-top: 0; }
/* Two quiet groups: level/stats and character details, with source clearly visible. */
.character-profile-page .profile-overview-balanced .profile-stats-panel,
.character-profile-page .profile-overview-balanced .profile-personal-details { padding: 20px 22px; border: 1px solid var(--profile-panel-border, #425e77); border-radius: 14px; background: #0c1928; }
.character-profile-page .profile-overview-balanced { align-items: start; }
.profile-details-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.profile-details-heading h2 { margin: 0; }
.profile-details-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 28px; }
.character-profile-page .profile-details-body .profile-voice-cast { margin: 0; }
.character-profile-page .profile-details-body .profile-voice-cast h2 { margin: 0 0 6px; font-size: 14px; color: #b9cbdb; }
.profile-details-body .stat-list { margin: 0; }
.profile-details-body .stat-list div { padding: 10px 0; }
.character-profile-page .profile-source-link { display: inline-flex; align-items: center; gap: 12px; padding: 9px 13px; border: 1px solid #a68b5466; border-radius: 8px; background: #d8bd8712; color: #e7ce95; font-size: 12px; font-weight: 650; margin: 0; text-decoration: none; }
.character-profile-page .profile-source-link:hover { background: #d8bd8724; border-color: #d8bd87; }
.profile-source-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.character-level-heading { border-bottom: 0; padding-bottom: 0; margin-bottom: 12px; }
.character-slider-motion { margin-top: 16px; }
/* Context appears below the ticks, keeping the compact heading and badge unobscured. */
.slider-level-hint { bottom: auto; top: 45px; z-index: 2; }
@media (max-width: 640px) {
 .profile-details-body { grid-template-columns: minmax(0,1fr); gap: 20px; }
 .character-profile-page .profile-overview-balanced .profile-stats-panel,
 .character-profile-page .profile-overview-balanced .profile-personal-details { padding: 16px; }
}
/* Align overview containers in two rows with one spacing/padding rhythm. */
.character-profile-page .profile-section .profile-overview-balanced { gap: 20px; align-items: stretch; }
.profile-overview-balanced .profile-identity-column,
.profile-overview-balanced .profile-stats-column { display: contents; }
.character-profile-page .profile-overview-balanced .profile-personal-details,
.character-profile-page .profile-overview-balanced .profile-voice-cast { margin: 0; padding: 20px 22px; border: 1px solid var(--profile-panel-border, #425e77); border-radius: 14px; background: #0c1928; }
.profile-overview-balanced .profile-details-body { grid-template-columns: minmax(0,1fr); }
.profile-overview-balanced .profile-details-heading { min-height: 36px; }
.profile-overview-balanced .profile-voice-cast .stat-list { margin: 0; }
.profile-overview-balanced .profile-voice-cast .stat-list div { padding: 10px 0; }
@media (min-width: 1051px) {
 .profile-overview-balanced .character-profile-hero { grid-column: 1; grid-row: 1; }
 .profile-overview-balanced .profile-stats-panel { grid-column: 2; grid-row: 1; }
 .profile-overview-balanced .profile-personal-details { grid-column: 1; grid-row: 2; }
 .profile-overview-balanced .profile-voice-cast { grid-column: 2; grid-row: 2; }
}
@media (max-width: 1050px) {
 .profile-overview-balanced .character-profile-hero { grid-row: 1; }
 .profile-overview-balanced .profile-stats-panel { grid-row: 2; }
 .profile-overview-balanced .profile-personal-details { grid-row: 3; }
 .profile-overview-balanced .profile-voice-cast { grid-row: 4; }
}
@media (max-width: 640px) {
 .character-profile-page .profile-overview-balanced .profile-personal-details,
 .character-profile-page .profile-overview-balanced .profile-voice-cast { padding: 16px; }
}
/* Furina-only wish-art prototype; the approved overview grid stays intact. */
.character-profile-page .profile-overview-balanced .profile-wish-prototype { position: relative; display: flex; align-items: end; padding: 24px; background: radial-gradient(ellipse at 70% 35%,#25466b,#091626 75%); }
.profile-wish-prototype .profile-namecard { display: none; }
.profile-wish-prototype .profile-art { position: absolute; inset: 0; height: auto; margin: 0; overflow: hidden; }
.character-profile-page.character-profile-featured .profile-wish-prototype .detail-portrait { position: absolute; width: 125%; max-width: none; height: 120%; top: -10%; left: 0; object-fit: contain; object-position: center; mask-image: none; }
.profile-wish-prototype .profile-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,#081423ed 0%,#081423c7 24%,#08142345 47%,transparent 70%),linear-gradient(0deg,#081423aa,transparent 45%); }
.character-profile-page .profile-wish-prototype .detail-copy { position: relative; z-index: 2; max-width: 48%; padding: 0; }
.character-profile-page .profile-wish-prototype .detail-copy .description { font-size: 12px; line-height: 1.65; margin: 14px 0 18px; }
.character-profile-page .profile-wish-prototype .detail-copy .stars { margin-bottom: 12px; }
.profile-wish-prototype .profile-title { font-size: 9px; letter-spacing: 1.2px; }
@media (max-width: 640px) {
 .character-profile-page .profile-overview-balanced .profile-wish-prototype { min-height: 430px; padding: 20px; }
 .character-profile-page.character-profile-featured .profile-wish-prototype .detail-portrait { width: 160%; height: 100%; top: -10%; left: -20%; }
 .profile-wish-prototype .profile-art::after { background: linear-gradient(0deg,#081423f5 0%,#081423d0 25%,#08142360 48%,transparent 75%); }
 .character-profile-page .profile-wish-prototype .detail-copy { max-width: 90%; }
 .character-profile-page .profile-wish-prototype .detail-copy h1 { font-size: 42px; }
 .character-profile-page .profile-wish-prototype .detail-copy .description { max-width: 290px; }
}
/* Information-panel typography; the wish-art stage retains its expressive styling. */
.character-profile-page .profile-overview-balanced .profile-details-heading h2,
.character-profile-page .profile-overview-balanced .profile-stats-panel .character-level-heading > span { font-size: 18px; font-weight: 650; line-height: 1.3; letter-spacing: -.2px; color: #edf3fa; }
.character-profile-page .profile-overview-balanced .profile-stats-panel .reference-stat-tile strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.character-profile-page .profile-overview-balanced .profile-stats-panel .reference-stat-tile > span,
.character-profile-page .profile-overview-balanced .profile-personal-details .stat-list div,
.character-profile-page .profile-overview-balanced .profile-voice-cast .stat-list div { font-size: 13px; line-height: 1.6; }
.character-profile-page .profile-overview-balanced .profile-stats-panel .reference-stat-tile > span,
.character-profile-page .profile-overview-balanced .stat-list dt { color: #bacddd; }
.character-profile-page .profile-overview-balanced .stat-list dd { color: #e4edf5; font-weight: 450; }
.profile-overview-balanced .character-range-limits { font-size: 10px; color: #a8bdce; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
 .profile-overview-balanced .character-range-limits { font-size: 9px; }
}
/* Rarity accents for the ascension bonus. */
.character-profile-page { --ascension-color: #e7ce95; --ascension-border: #a68b5466; --ascension-surface: #d8bd8712; }
.character-profile-page[data-rarity="4"] { --ascension-color: #d8b9f4; --ascension-border: #a77bca77; --ascension-surface: #b58ad51a; }
.character-profile-page[data-rarity="3"] { --ascension-color: #a9d6f4; --ascension-border: #75abce77; --ascension-surface: #81b7db1a; }
/* The bonus sits beside the level heading, without an extra stat row or disclosure. */
.character-level-context { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.character-profile-page .profile-overview-balanced .profile-stats-panel .character-level-context > label { font-size: 18px; font-weight: 650; line-height: 1.3; letter-spacing: -.2px; color: #edf3fa; }
.ascension-header-badge { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 5px 8px; border: 1px solid var(--ascension-border); border-radius: 7px; background: var(--ascension-surface); color: var(--ascension-color); font-size: 12px; line-height: 1.5; font-weight: 500; }
.ascension-header-badge strong { font-size: inherit; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.character-level-heading { gap: 12px; }
.character-level-heading > output { flex-shrink: 0; }
.character-level-heading { flex-wrap: wrap; }
.character-level-values { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; margin-left: auto; }
.character-level-values > output { flex-shrink: 0; }
/* Compact icon/value control reveals which stat receives the ascension bonus. */
button.ascension-header-badge { min-height: 34px; padding: 4px 10px; border-radius: 10px; font-family: var(--font); font-size: 17px; font-weight: 700; cursor: pointer; }
.ascension-header-badge img { width: 20px; height: 20px; object-fit: contain; }
button.ascension-header-badge strong { font-weight: 700; }
button.ascension-header-badge:hover, button.ascension-header-badge[aria-pressed="true"] { border-color: var(--ascension-color); background: var(--ascension-surface); box-shadow: 0 0 0 2px var(--ascension-surface); }
button.ascension-header-badge:focus-visible { outline: 2px solid var(--ascension-color); outline-offset: 3px; }
.character-profile-page .profile-overview-balanced .profile-stats-panel .ascension-stat-highlight { padding: 9px 10px; border-radius: 7px; border-left: 2px solid var(--ascension-color); background: var(--ascension-surface); }
.character-profile-page .profile-overview-balanced .profile-stats-panel .ascension-stat-highlight strong { color: var(--ascension-color); }
.ascension-stat-contribution { display: block; margin-top: 3px; font-size: 11px; color: var(--ascension-color); line-height: 1.5; }
/* Materials inherit the profile's restrained panels and compact progression controls. */
#profile-section-materials .material-progression-layout { grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 20px; align-items: stretch; }
#profile-section-materials .material-results,
#profile-section-materials .material-character-controls,
#profile-section-materials .material-talent-controls { border: 1px solid var(--profile-panel-border, #425e77); border-radius: 14px; background: #0c1928; padding: 20px; min-width: 0; }
.character-profile-page #profile-section-materials .reference-material-panel + .reference-material-panel { border-top: 0; margin-top: 20px; padding-top: 0; }
#profile-section-materials .material-result-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
#profile-section-materials .material-result-heading h2 { margin: 0; font-size: 18px; font-weight: 650; }
#profile-section-materials .material-range-summary { font-size: 11px; color: #a8c8e2; margin: 0; }
#profile-section-materials .material-cards { grid-template-columns: repeat(auto-fill,minmax(90px,1fr)); gap: 9px; margin: 0; }
#profile-section-materials .material-card { padding: 9px 6px; border-radius: 10px; }
#profile-section-materials .material-art { height: 60px; margin-bottom: 8px; }
#profile-section-materials .material-art img { width: 60px; height: 60px; }
#profile-section-materials .material-count { font-size: 13px; font-weight: 650; }
#profile-section-materials .material-name { color: #b9cddd; font-size: 10px; line-height: 1.4; }
#profile-section-materials .material-character-controls > legend { float: left; width: 100%; font-size: 18px; font-weight: 650; margin-bottom: 18px; }
#profile-section-materials .material-character-controls > legend + .material-endpoint { clear: both; }
.material-plan-badge { margin-left: auto; flex-shrink: 0; padding: 5px 9px; border-radius: 8px; background: #17334a; color: #a7d8ff; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
#profile-section-materials .material-talent-controls { display: block; margin: 0; }
.material-talent-controls > h3 { margin: 0 0 16px; font-size: 18px; font-weight: 650; }
#profile-section-materials .material-talent-control { margin: 0; padding: 14px 0 4px; border-top: 1px solid #ffffff12; }
#profile-section-materials .material-talent-control legend { width: 100%; margin: 0 0 12px; font-size: 13px; }
.material-talent-endpoints { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; }
#profile-section-materials .material-talent-control .range-heading { font-size: 11px; margin-bottom: 6px; }
#profile-section-materials .material-talent-control .range-heading output { font-size: 13px; font-weight: 650; color: #a7d8ff; }
#profile-section-materials .material-talent-control .range-limits { font-size: 9px; color: #a8bdce; margin-bottom: 8px; }
.talent-slider-motion { position: relative; height: 20px; margin: 8px 0 5px; }
.talent-slider-motion .level-range { position: absolute; inset: 7px 0 auto; margin: 0; appearance: none; height: 6px; border-radius: 3px; background: linear-gradient(to right,var(--accent) var(--level-progress),#8d9daf var(--level-progress)); }
.talent-slider-motion .level-range::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; opacity: 0; }
.talent-slider-motion .level-range::-moz-range-thumb { width: 16px; height: 16px; opacity: 0; }
.talent-slider-motion .level-range:focus-visible { outline: none; }
.talent-slider-motion .level-range:focus-visible + .slider-visual-thumb { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 850px) {
 #profile-section-materials .material-progression-layout { grid-template-columns: minmax(0,1fr); }
 #profile-section-materials .material-character-controls, #profile-section-materials .material-talent-controls { order: -1; }
}
@media (max-width: 640px) {
 #profile-section-materials .material-results, #profile-section-materials .material-character-controls, #profile-section-materials .material-talent-controls { padding: 16px; }
 #profile-section-materials .material-cards { grid-template-columns: repeat(auto-fill,minmax(80px,1fr)); }
 .material-talent-endpoints { gap: 14px; }
 .material-talent-control .material-plan-badge { font-size: 11px; padding: 4px 6px; }
}
#profile-section-materials .material-talent-control legend > span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
#profile-section-materials .material-cards { grid-template-columns: repeat(auto-fill,minmax(80px,1fr)); }
#profile-section-materials .material-talent-control { padding-top: 10px; padding-bottom: 0; }
#profile-section-materials .material-talent-control legend { margin-bottom: 8px; }
#profile-section-materials .material-talent-control .material-endpoint { margin-bottom: 0; }
#profile-section-materials .material-talent-control .range-limits { margin-bottom: 0; }
/* A square, padded artwork well gives material icons room inside compact cards. */
#profile-section-materials .material-card { padding: 10px 8px; border-radius: 14px; }
#profile-section-materials .material-art { width: min(100%,96px); height: auto; aspect-ratio: 1; padding: 8px; border-radius: 14px; margin-bottom: 12px; background: #050d17a6; }
#profile-section-materials .material-art img { width: 100%; height: 100%; max-width: 72px; max-height: 72px; object-fit: contain; filter: drop-shadow(0 2px 4px #00000020); }
/* Wider material cards prioritize names and artwork over squeezing in columns. */
#profile-section-materials .material-progression-layout { grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); }
#profile-section-materials .material-cards { grid-template-columns: repeat(auto-fill,minmax(104px,1fr)); gap: 12px; }
#profile-section-materials .material-card { padding: 12px 10px; }
#profile-section-materials .material-count { font-size: 14px; }
#profile-section-materials .material-name { font-size: 11px; line-height: 1.4; }
@media (max-width: 850px) {
 #profile-section-materials .material-progression-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 400px) {
 #profile-section-materials .material-cards { grid-template-columns: repeat(auto-fill,minmax(90px,1fr)); gap: 10px; }
 #profile-section-materials .material-card { padding: 10px 8px; }
}
/* Each ability has a clear boundary and explicit current/target controls. */
.material-ability-group { padding: 18px 0; border-top: 1px solid #ffffff16; }
.material-ability-group:first-of-type { border-top: 0; padding-top: 0; }
.material-ability-group:last-child { padding-bottom: 0; }
#profile-section-materials .material-ability-group .material-talent-control { padding: 0; border: 0; }
#profile-section-materials .material-ability-group legend { margin-bottom: 14px; font-size: 14px; font-weight: 650; color: #e5eef6; }
#profile-section-materials .material-ability-group legend small { font-size: 12px; font-weight: 400; line-height: 1.4; color: #a5bcd0; }
#profile-section-materials .material-ability-group .range-heading { min-height: 30px; gap: 6px; line-height: 1.3; }
#profile-section-materials .material-ability-group .range-heading > span { min-width: 0; }
#profile-section-materials .material-ability-group .range-heading output { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; padding: 4px 6px; border-radius: 6px; background: #17334a; font-size: 14px; font-weight: 650; }
#profile-section-materials .material-ability-group .material-endpoint:first-child output { background: #182b3c; color: #c5d4e2; }
/* Ascension endpoints use the same current/target language and value badges as talents. */
#profile-section-materials .material-character-controls .range-heading { min-height: 30px; margin: 0 0 6px; gap: 6px; font-size: 11px; line-height: 1.3; align-items: center; }
#profile-section-materials .material-character-controls .range-heading output { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; padding: 4px 6px; border-radius: 6px; background: #17334a; font-size: 14px; font-weight: 650; }
#profile-section-materials .material-character-controls .material-endpoint:first-of-type output { background: #182b3c; color: #c5d4e2; }
#profile-section-materials .material-character-controls .range-heading:has(+ .character-slider-motion .special-ascension-selected) output { background: #2d2342; color: #dcc6ff; }
#profile-section-materials .material-character-controls .character-slider-motion { margin-top: 8px; }
#profile-section-materials .material-character-controls .character-range-limits { margin-bottom: 0; }
#profile-section-materials .material-character-controls .material-endpoint { margin-bottom: 22px; }
#profile-section-materials .material-character-controls .material-endpoint:last-child { margin-bottom: 0; }
/* Talent and constellation references share the profile/material panel language. */
#profile-section-talents .panel,
.character-profile-page #profile-section-constellations .constellation-item { padding: 20px 22px; border: 1px solid var(--profile-panel-border, #425e77); border-radius: 14px; background: #0c1928; }
#profile-section-talents .talent-grid,
#profile-section-talents .reference-passive-grid,
.character-profile-page #profile-section-constellations .constellation-list { gap: 20px; }
#profile-section-talents > .section-heading h2,
#profile-section-constellations > .section-heading h2 { font-size: 18px; font-weight: 650; line-height: 1.3; letter-spacing: -.2px; }
#profile-section-talents .talent-head { gap: 12px; margin-bottom: 14px; padding-bottom: 0; border-bottom: 0; }
#profile-section-talents .talent-icon { width: 40px; height: 40px; flex-basis: 40px; border-radius: 10px; background: #14283a; border-color: #344c60; }
#profile-section-talents .talent-icon img { width: 28px; height: 28px; }
#profile-section-talents .talent-head h3 { font-size: 16px; font-weight: 650; line-height: 1.4; }
#profile-section-talents .talent-head p { font-size: 12px; color: #a5bcd0; }
#profile-section-talents .talent-description,
#profile-section-talents .reference-text,
#profile-section-talents .reference-description p,
#profile-section-constellations .reference-text { font-size: 13px; line-height: 1.75; color: #bacddd; }
#profile-section-talents .talent-description { min-height: 0; }
#profile-section-talents .reference-description { font-size: 12px; margin-bottom: 18px; }
#profile-section-talents .reference-description summary { color: #9bc8eb; cursor: pointer; }
#profile-section-talents .reference-note { color: #a5bcd0; font-size: 11px; line-height: 1.6; }
.talent-level-heading { align-items: center; margin-top: 16px; font-size: 13px; font-weight: 500; }
.talent-level-heading output { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 32px; padding: 4px 9px; border-radius: 9px; background: #17334a; color: #a7d8ff; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
#profile-section-talents .range-limits { color: #a8bdce; font-size: 10px; }
#profile-section-talents .multiplier-label { color: #a8bdce; font-size: 12px; font-weight: 600; }
#profile-section-talents .multiplier-table td { padding: 10px 0; font-size: 13px; }
#profile-section-talents .multiplier-table td:first-child { padding-right: 14px; color: #bacddd; overflow-wrap: anywhere; }
#profile-section-talents .multiplier-table td:last-child { color: #e4edf5; font-weight: 600; font-variant-numeric: tabular-nums; }
#profile-section-constellations .constellation-heading { margin-bottom: 16px; }
#profile-section-constellations .constellation-icon-frame { border-radius: 10px; background: #14283a; border-color: #344c60; }
#profile-section-constellations .constellation-item h3 { font-size: 16px; font-weight: 650; line-height: 1.4; }
#profile-section-constellations .constellation-index { font-size: 12px; color: #a5bcd0; }
@media (max-width: 640px) {
 #profile-section-talents .panel,
 .character-profile-page #profile-section-constellations .constellation-item { padding: 16px; }
 #profile-section-talents .multiplier-table td { font-size: 12px; }
}
#profile-section-talents .multiplier-table { border: 0; border-radius: 0; background: transparent; }
#profile-section-talents .multiplier-table td { border-bottom-color: #ffffff12; }

/* Written dialogue is immediately readable, grouped by its source category. */
.character-profile-page .voiceline-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 20px; }
.voiceline-group { min-width: 0; }
.character-profile-page .voiceline-group .section-heading { margin: 0; gap: 12px; }
.character-profile-page .voiceline-group h3 { margin: 0; font-size: 18px; font-weight: 650; }
.voiceline-group-description { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 10px 0 18px; }
.voiceline-group .archive-entries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.character-profile-page .voiceline-card { background: #0c1928; border: 1px solid var(--profile-panel-border, #425e77); border-radius: 14px; padding: 20px 22px 16px; min-width: 0; }
.voiceline-card h4 { color: #e4edf5; font-size: 16px; font-weight: 650; line-height: 1.5; margin: 0; }
.character-profile-page .voiceline-card .reference-text { font-size: 13px; line-height: 1.75; margin: 10px 0 0; overflow-wrap: anywhere; }
.voiceline-card .archive-unlock { color: #91aabd; font-size: 11px; margin: 14px 0 0; overflow-wrap: anywhere; }
.voiceline-group[hidden], .voiceline-card[hidden] { display: none; }
@media (max-width: 640px) {
  .voiceline-group .archive-entries { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .character-profile-page .voiceline-card { padding: 16px 16px 12px; }
}

/* Chapter navigation stays visible alongside a bounded reading column. */
.story-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 20px; }
.character-profile-page .story-chapters,
.character-profile-page .story-reader { background: #0c1928; border: 1px solid var(--profile-panel-border, #425e77); border-radius: 14px; min-width: 0; }
.character-profile-page .story-chapters { padding: 10px; display: grid; gap: 4px; }
.story-chapter { display: flex; align-items: baseline; gap: 12px; width: 100%; text-align: left; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #b8cddd; padding: 13px 12px; font: inherit; font-size: 13px; line-height: 1.5; font-weight: 600; cursor: pointer; transition: background 140ms, border-color 140ms, color 140ms; }
.story-chapter-number { color: #7893a8; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.story-chapter:hover { background: #13283b; color: #e4edf5; }
.story-chapter[aria-current] { background: #19364b; border-color: #3c617b; color: #d5edff; }
.story-chapter[aria-current] .story-chapter-number { color: #82caff; }
.story-chapter:focus-visible { outline: 2px solid #82caff; outline-offset: 2px; }
.character-profile-page .story-reader { padding: 24px 28px; }
.story-reader-content { max-width: 72ch; margin-inline: 0; animation: story-reader-fade 180ms ease-out; }
.story-reader h3 { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 650; color: #e4edf5; }
.character-profile-page .story-reader .reference-text { font-size: 15px; line-height: 1.85; margin: 20px 0 0; overflow-wrap: anywhere; }
.story-reader .archive-unlock { margin: 10px 0 0; }
@keyframes story-reader-fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 850px) {
  .story-layout { grid-template-columns: minmax(0, 1fr); }
  .character-profile-page .story-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-chapter { padding: 11px 10px; gap: 8px; }
  .character-profile-page .story-reader { padding: 20px; }
}
@media (max-width: 400px) {
  .character-profile-page .story-chapters { grid-template-columns: minmax(0, 1fr); }
  .character-profile-page .story-reader { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .story-reader-content { animation: none; }
  .story-chapter { transition: none; }
}

/* More compact chapter proportions, with useful unlock context and reading controls. */
.character-archive[data-archive-kind="stories"] > .section-heading { margin-bottom: 16px; }
.character-archive[data-archive-kind="stories"] > .reference-note { margin: 0 0 16px; }
.character-archive[data-archive-kind="stories"] .story-layout { margin-top: 0; }
.story-chapter-copy { display: grid; gap: 4px; min-width: 0; }
.story-chapter-unlock { color: #8faabd; font-size: 11px; line-height: 1.5; font-weight: 400; overflow-wrap: anywhere; }
.story-chapter[aria-current] .story-chapter-unlock { color: #b0cadd; }
.story-pagination { display: flex; justify-content: space-between; gap: 12px; max-width: 72ch; margin-top: 24px; padding-top: 16px; border-top: 1px solid #ffffff12; }
.story-pagination button { color: #bde3ff; border: 1px solid #304b60; background: #132b3d; border-radius: 9px; padding: 10px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.story-pagination button:hover:not(:disabled) { background: #193b52; border-color: #5b829f; }
.story-pagination button:focus-visible { outline: 2px solid #82caff; outline-offset: 2px; }
.story-pagination button:disabled { color: #7f94a4; background: transparent; border-color: #ffffff12; cursor: default; }
.story-reader h3 { scroll-margin-top: calc(var(--profile-nav-top, 80px) + 90px); }
.story-reader h3:focus { outline: none; }
@media (min-width: 851px) and (max-width: 1100px) { .story-layout { grid-template-columns: 260px minmax(0, 1fr); } }

/* Persistent chapter controls give the reading margins a defined purpose. */
.character-profile-page .story-reader { position: relative; container: story-reader / inline-size; }
.story-reader-content { margin-inline: auto; }
.story-pagination { margin-inline: auto; }
.story-pagination button { position: relative; display: grid; grid-template-columns: auto 1fr; align-content: start; align-items: center; gap: 6px 10px; text-align: left; width: min(46%, 220px); transition: border-color 150ms, background 150ms; }
.story-nav-label { font-size: 12px; }
.story-nav-arrow { grid-column: 1; grid-row: 1; display: inline-flex; justify-content: center; align-items: center; width: 28px; height: 28px; font-size: 18px; transition: transform 150ms, border-color 150ms, box-shadow 150ms; }
.story-nav-label { grid-column: 2; grid-row: 1; }
.story-nav-hint { grid-column: 1 / -1; color: #a5bdcf; font-size: 11px; line-height: 1.5; font-weight: 400; overflow-wrap: anywhere; }
.story-nav-hint:empty { display: none; }
.story-pagination button:hover:not(:disabled) .story-nav-arrow { transform: translateX(-3px); }
.story-pagination [data-story-step="1"]:hover:not(:disabled) .story-nav-arrow { transform: translateX(3px); }
@container story-reader (min-width: 840px) {
  .story-reader-body { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 72ch) minmax(100px, 1fr); gap: 32px; }
  .story-reader-content { grid-column: 2; grid-row: 1; width: 100%; margin: 0; }
  .story-pagination { display: contents; }
  .story-pagination button { grid-row: 1; position: sticky; top: calc(var(--profile-nav-top, 80px) + 100px); align-self: start; margin-top: 56px; width: 100%; padding: 6px 12px; border: 0; border-radius: 0; background: transparent; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
  .story-pagination [data-story-step="-1"] { grid-column: 1; }
  .story-pagination [data-story-step="1"] { grid-column: 3; }
  .story-pagination [data-story-step="-1"] > span { translate: -14px 0; }
  .story-pagination [data-story-step="1"] > span { translate: 14px 0; }
  .story-pagination button::after { content: ''; position: absolute; inset-block: 0; right: 0; width: 1px; background: linear-gradient(transparent, #304b60 20%, #304b60 80%, transparent); }
  .story-pagination [data-story-step="1"]::after { right: auto; left: 0; }
  .story-pagination button:hover:not(:disabled) { background: transparent; }
  .story-nav-label { color: #a5bdcf; font-size: 11px; font-weight: 500; order: 0; }
  .story-nav-arrow { order: 1; width: 48px; height: 48px; border: 1px solid #4b88b0; border-radius: 13px; background: linear-gradient(145deg, #214966, #17354d); color: #c4eaff; font-size: 22px; }
  .story-nav-hint { order: 2; color: #b8d1e3; font-size: 11px; min-height: 33px; max-width: 140px; }
  .story-pagination button:hover:not(:disabled) .story-nav-arrow,
  .story-pagination button:focus-visible .story-nav-arrow { border-color: #88cdff; box-shadow: 0 0 0 4px #65bcf416, 0 0 18px #65bcf422; }
  .story-nav-hint:empty { display: block; }
  .story-pagination button:disabled .story-nav-arrow { background: transparent; border-color: #ffffff12; color: #667f91; }
  .story-pagination button:disabled .story-nav-label { color: #7890a1; }
}
@media (prefers-reduced-motion: reduce) {
  .story-pagination button, .story-nav-arrow { transition: none; }
  .story-pagination button:hover:not(:disabled) .story-nav-arrow,
  .story-pagination [data-story-step="1"]:hover:not(:disabled) .story-nav-arrow { transform: none; }
}

.story-nav-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }

/* Compact language controls stream one recording at a time. */
.voice-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.voice-controls button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 32px; padding: 5px 11px; border: 1px solid #34546d; border-radius: 999px; background: #172f43; color: #c5deef; font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; transition: background 140ms, border-color 140ms; }
.voice-controls button:hover:not(:disabled) { background: #244b67; border-color: #76b5df; }
.voice-controls button:focus-visible { outline: 2px solid #82caff; outline-offset: 3px; }
.voice-controls button[aria-pressed="true"] { color: #e5f5ff; background: #245779; border-color: #87ccfa; }
.voice-controls .voice-stop { min-width: 36px; padding: 5px 9px; }
.voice-stop svg { width: 16px; height: 16px; fill: currentColor; }
.voice-controls button:disabled { opacity: .4; cursor: default; }
.voice-status { color: #93bbd5; font-size: 11px; line-height: 1.5; margin: 8px 0 0; min-height: 17px; }
.voice-status:empty { margin: 0; min-height: 0; }
.voice-unavailable { color: #7894a8; font-size: 11px; margin: 16px 0 0; }
.voiceline-card[data-audio-state="playing"], .voiceline-card[data-audio-state="loading"] { border-color: #578bad; }
.voiceline-card[data-audio-state="error"] .voice-status { color: #e2baa0; }
.voiceline-card[data-audio-state="playing"] [aria-pressed="true"]::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #a5e0ff; margin-right: 6px; animation: voice-pulse 1.2s ease-in-out infinite alternate; }
@keyframes voice-pulse { from { opacity: .45; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .voice-controls button { transition: none; } .voiceline-card[data-audio-state="playing"] [aria-pressed="true"]::before { animation: none; } }

/* Voice cast previews use the same exclusive player as full dialogue cards. */
.voice-cast-value { display: flex; align-items: center; justify-content: flex-end; gap: 3px; padding-right: 6px; min-width: 0; }
.voice-cast-copy { display: grid; min-width: 0; overflow-wrap: anywhere; }
.voice-cast-row .voice-controls { flex-shrink: 0; margin: 0; }
.voice-cast-row .voice-controls .voice-sample-button { min-width: 24px; min-height: 24px; width: 24px; height: 24px; padding: 0; border-radius: 8px; background: transparent; border-color: transparent; color: #8299ab; }
.voice-cast-row .voice-controls .voice-sample-button:hover:not(:disabled) { background: #142638; border-color: #2b4355; color: #b6d1e4; }
.voice-cast-row .voice-controls .voice-sample-button[aria-pressed="true"] { background: #142a3b; border-color: #304b60; color: #a1d4f4; }
.voice-sample-button svg { width: 11px; height: 11px; fill: currentColor; }
.voice-sample-button .sample-stop, .voice-sample-button[aria-pressed="true"] .sample-play { display: none; }
.voice-sample-button[aria-pressed="true"] .sample-stop { display: block; }
.voice-cast-status { color: #93bbd5; font-size: 10px; font-weight: 400; line-height: 1.5; }
.voice-cast-status:empty { display: none; }
.voice-cast-row[data-audio-state="playing"], .voice-cast-row[data-audio-state="loading"] { background: linear-gradient(90deg, transparent, #24577922); }
.voice-cast-row[data-audio-state="playing"] .voice-cast-copy, .voice-cast-row[data-audio-state="loading"] .voice-cast-copy { color: #b9e4ff; }
.voice-cast-row[data-audio-state="error"] .voice-cast-status { color: #e2baa0; }
.character-profile-page .profile-overview-balanced .profile-voice-cast .stat-list .voice-cast-row { padding: 8px 0; }

.voice-cast-copy .voice-actor-link { color: inherit; text-decoration: none; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.voice-cast-copy .voice-actor-link:hover,
.voice-cast-copy .voice-actor-link:focus-visible { color: #c0e4ff; text-decoration: underline; }
.voice-cast-copy .voice-actor-link:focus-visible { outline: 1px solid #82caff; outline-offset: 3px; border-radius: 2px; }

.voice-cast-copy .voice-actor-link[data-voice-actor="amber-lee-connors"] { font-family: var(--font-display); font-size: 17px; font-weight: 500; line-height: 1.4; letter-spacing: .1px; }

/* Amber's credited name shares Furina's gold display treatment. */
.voice-cast-copy .voice-actor-link[data-voice-actor="amber-lee-connors"] { color: var(--gold); font-weight: 600; text-decoration-color: #e9ce92; }
.voice-cast-copy .voice-actor-link[data-voice-actor="amber-lee-connors"]:hover,
.voice-cast-copy .voice-actor-link[data-voice-actor="amber-lee-connors"]:focus-visible { color: #fff0bc; outline-color: var(--gold); }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .voice-cast-copy .voice-actor-link[data-voice-actor="amber-lee-connors"] {
    background-image: linear-gradient(110deg, #d8bd87 0%, #e5c887 36%, #fff5cf 44%, #fffaf0 48%, #e5c887 55%, #d8bd87 100%);
    background-size: 260% 100%; background-position: 100% 0;
    background-clip: text; -webkit-background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 3px #e6bd6930);
    animation: amber-name-glisten 9s ease-in-out infinite;
  }
}
@keyframes amber-name-glisten {
  0%, 28% { background-position: 100% 0; filter: drop-shadow(0 0 3px #e6bd6930); }
  44% { filter: drop-shadow(0 0 6px #ffe5aa66); }
  60%, 100% { background-position: -100% 0; filter: drop-shadow(0 0 3px #e6bd6930); }
}
@media (prefers-reduced-motion: reduce) {
  .voice-cast-copy .voice-actor-link[data-voice-actor="amber-lee-connors"] { animation: none; background: none; color: var(--gold); -webkit-text-fill-color: var(--gold); filter: none; }
}

/* Clearer shared container edges; character-art and rarity borders stay distinct. */
.character-profile-page { --profile-panel-border: #425e77; }
.character-profile-page :is(.profile-stats-panel, .profile-personal-details, .profile-voice-cast, .material-results, .material-character-controls, .material-talent-controls, .talent-card, .constellation-item, .story-chapters, .story-reader, .voiceline-card),
.character-profile-page #profile-section-talents .panel {
  box-shadow: inset 0 1px 0 #b9ddff12, inset 0 0 0 1px #b9ddff04;
}
.character-profile-page .profile-overview-balanced .profile-stats-panel { border-color: var(--profile-panel-border); }

/* Character-associated originals, downloadable without changing their image bytes. */
.character-other-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.character-profile-page .character-other-card { background: #0c1928; border: 1px solid var(--profile-panel-border, #425e77); border-radius: 14px; padding: 20px 22px; min-width: 0; box-shadow: inset 0 1px 0 #b9ddff12, inset 0 0 0 1px #b9ddff04; }
.character-other-card > h3 { font-size: 18px; font-weight: 650; margin: 0 0 18px; }
.character-other-card h4 { font-size: 15px; font-weight: 600; line-height: 1.5; margin: 0; }
.other-asset { margin: 0; min-width: 0; }
.other-asset-preview { display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #2c4256; border-radius: 10px; background: #081422; }
.other-asset-preview img { display: block; max-width: 100%; width: 100%; height: auto; object-fit: contain; }
.other-asset figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-top: 12px; }
.other-asset-format { font-size: 10px; color: #8faabd; line-height: 1.5; }
.other-asset-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.other-asset-actions a { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 10px; border: 1px solid #34546d; border-radius: 8px; color: #bdddf4; font-size: 11px; font-weight: 600; background: #142b3d; }
.other-asset-actions a:hover { background: #1c3d54; border-color: #6a9abb; }
.other-asset-actions a:focus-visible, .other-asset-preview:focus-visible, .other-dish-preview:focus-visible { outline: 2px solid #82caff; outline-offset: 3px; }
.other-description { color: #b8cddd; font-size: 13px; line-height: 1.75; white-space: pre-line; margin: 16px 0 0; overflow-wrap: anywhere; }
.other-unlock { color: #91aabd; font-size: 11px; line-height: 1.6; margin: 12px 0 0; }
.other-namecard-variants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #ffffff12; }
.other-asset-compact .other-asset-preview { height: 88px; }
.other-asset-compact .other-asset-preview img { width: auto; max-height: 76px; }
.other-asset-compact h4 { font-size: 13px; }
.other-dish-heading { display: flex; gap: 16px; align-items: center; }
.other-dish-preview { display: flex; align-items: center; justify-content: center; background: #081422; border-radius: 14px; width: 88px; height: 88px; flex-shrink: 0; }
.other-dish-preview img { width: 72px; height: 72px; object-fit: contain; }
.other-dish-effect { margin: 18px 0; padding: 12px 14px; border: 1px solid #2c4256; border-radius: 10px; background: #122538; }
.other-dish-effect > span { display: block; color: #91bdda; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; font-weight: 650; }
.other-dish-effect p { margin: 6px 0 0; color: #d6e5f1; font-size: 13px; line-height: 1.7; }
.other-artwork-card { grid-column: 1 / -1; }
.other-default-outfit { margin-bottom: 20px; max-width: 80ch; }
.other-default-outfit h4 small { font-family: var(--font); font-weight: 400; font-size: 11px; color: #91aabd; margin-left: 8px; }
.other-default-outfit .other-description { margin-top: 8px; }
.other-artwork-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.other-artwork-grid .other-asset-preview { height: 280px; background-color: #081422; background-image: conic-gradient(#ffffff03 25%, transparent 0 50%, #ffffff03 0 75%, transparent 0); background-size: 20px 20px; }
.other-artwork-grid .other-asset-preview img { height: 100%; width: 100%; padding: 12px; }
@media (max-width: 850px) { .character-other-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .character-profile-page .character-other-card { padding: 16px; } .other-artwork-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 400px) { .other-namecard-variants { grid-template-columns: minmax(0, 1fr); } }

/* The profile anchor carries character identity after the artwork leaves view. */
.profile-section-tabs { display: flex; flex: 0 0 auto; gap: 4px; transform: translateX(var(--profile-tabs-shift, 0px)); transition: transform 300ms cubic-bezier(.2,.8,.2,1); }
.profile-anchor-icons { position: relative; display: inline-block; width: 20px; height: 20px; flex: 0 0 20px; }
.profile-anchor-icons :is(img, svg) { position: absolute; top: 50%; left: 50%; object-fit: contain; transform: translate(-50%, -50%); transition: opacity 200ms ease, transform 200ms ease; }
.profile-generic-icon { width: 20px; height: 20px; filter: brightness(0) invert(1); opacity: .72; }
.profile-anchor-icons .profile-side-icon { width: 28px; height: 28px; opacity: 0; transform: translate(-50%, -40%) scale(.85); }
.profile-home-link:is(.active,:hover,:focus-visible) .profile-generic-icon { opacity: 1; }
.profile-nav-condensed .profile-generic-icon,
.profile-nav-condensed .profile-home-link:is(.active,:hover,:focus-visible) .profile-generic-icon { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
.profile-nav-condensed .profile-anchor-icons .profile-side-icon { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.profile-home-link [data-profile-label] { white-space: nowrap; }
@media (max-width: 640px) { .profile-section-tabs { gap: 2px; } }
@media (prefers-reduced-motion: reduce) { .profile-section-tabs, .profile-anchor-icons :is(img, svg) { transition: none; } }

/* Inline official related-effect references; Vesna's reviewed kit is the first pass. */
.kit-emphasis { color: #e8c67e; font-weight: 600; }
.kit-element { font-weight: 600; }
.kit-pyro { color: #ef936f; }
.kit-hydro { color: #70b7ec; }
.kit-anemo { color: #80dfc5; }
.kit-electro { color: #bba0ee; }
.kit-dendro { color: #a5d879; }
.kit-cryo { color: #99d7e5; }
.kit-geo { color: #e6c77e; }
.kit-term { display: inline; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #e8c67e; font: inherit; font-weight: 600; line-height: inherit; text-align: inherit; text-decoration: underline; text-decoration-color: #e8c67e70; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: help; }
.kit-term:hover, .kit-term[aria-expanded="true"] { color: #ffe3a4; text-decoration-color: currentColor; }
.kit-term:focus-visible { outline: 2px solid #87cfff; outline-offset: 3px; }
.kit-term-popover { position: fixed; z-index: 80; width: min(410px, calc(100vw - 24px)); padding: 20px; border: 1px solid #67829b; border-radius: 12px; background: #101e2ff5; box-shadow: 0 12px 36px #0008, inset 0 1px 0 #d4eaff12; backdrop-filter: blur(12px); color: #c8dceb; }
.kit-term-popover[hidden] { display: none; }
.kit-term-popover h3 { margin: 0 28px 12px 0; font-size: 16px; line-height: 1.4; color: #eef5fb; }
.kit-term-body { max-height: min(390px, calc(100dvh - 114px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; white-space: pre-line; font-size: 13px; line-height: 1.7; }
.kit-term-close { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: #a8c5da; font-size: 22px; cursor: pointer; }
.kit-term-close:hover, .kit-term-close:focus-visible { background: #234158; color: #eef5fb; }

/* Shared wish-art cards: quiet element lighting, clear copy and full character poses. */
.character-profile-page .profile-overview-balanced .profile-wish-standard { display: flex; align-items: center; position: relative; min-height: 390px; padding: 28px; background: radial-gradient(ellipse at 78% 42%, color-mix(in srgb, var(--profile-accent) 18%, #0c1928), #0a1726 75%); }
.profile-wish-standard .profile-art { position: absolute; inset: 0; height: auto; margin: 0; overflow: hidden; pointer-events: none; }
.character-profile-page .profile-wish-standard .detail-portrait { position: absolute; width: 125%; max-width: none; height: 100%; top: 0; left: 7%; margin: 0; object-fit: contain; object-position: center; mask-image: none; }
.profile-wish-standard .profile-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #0b1828f5 0%, #0b1828e6 22%, #0b182880 42%, #0b18280d 65%), linear-gradient(0deg, #0b182855, transparent 35%); }
.character-profile-page .profile-wish-standard .detail-copy { position: relative; z-index: 2; width: 42%; max-width: 360px; padding: 0; }
.character-profile-page .profile-wish-standard .detail-copy h1 { font-size: clamp(30px, 2.8vw, 44px); line-height: 1.08; letter-spacing: -.8px; }
.profile-wish-standard .profile-title { font-size: 10px; letter-spacing: 1.15px; }
.character-profile-page .profile-wish-standard .detail-copy .description { margin: 18px 0 22px; font-size: 12px; line-height: 1.7; color: #c6d8e7; }
.profile-wish-standard .profile-attributes { gap: 7px; font-size: 12px; }
.profile-wish-standard .profile-region { flex-basis: 100%; margin: 3px 0 0; padding: 0; border: 0; color: #a5bed2; font-weight: 400; }
@media (max-width: 640px) {
 .character-profile-page .profile-overview-balanced .profile-wish-standard { display: flex; flex-direction: column; align-items: stretch; padding: 20px; gap: 0; min-height: 0; background: #0b1828; }
 .profile-wish-standard .profile-art { position: relative; inset: auto; flex: none; height: 260px; margin: -20px -20px 0; background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--profile-accent) 16%, #0b1828), #0b1828 75%); }
 .character-profile-page .profile-wish-standard .detail-portrait { width: 150%; height: 100%; left: -25%; top: 0; }
 .profile-wish-standard .profile-art::after { background: linear-gradient(0deg, #0b1828, #0b18284d 16%, transparent 42%); }
 .character-profile-page .profile-wish-standard .detail-copy { width: 100%; max-width: none; padding: 6px 0 0; }
 .character-profile-page .profile-wish-standard .detail-copy h1 { font-size: 34px; }
 .profile-wish-standard .profile-region { flex-basis: auto; margin: 0; }
 .character-profile-page .profile-wish-standard .detail-copy .description { margin: 14px 0 18px; }
}

/* Optional profile backdrops resolve through the shared asset library. */
.character-profile-page .profile-overview-balanced .profile-backdrop { background: #0b1828; }
.profile-scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.profile-scene img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--profile-scene-position, 50% 60%); transform: translateX(var(--profile-scene-offset, 0%)); opacity: .6; filter: saturate(.7) brightness(.9); }
.profile-scene::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,#0b1828e6,#0b182875 32%,transparent 65%),linear-gradient(0deg,#0b182855,transparent 35%); }
@media (max-width: 640px) {
 .profile-scene { bottom: auto; height: 260px; }
 .profile-scene::after { background: linear-gradient(0deg,#0b1828,#0b18284d 16%,transparent 42%); }
 .profile-backdrop .profile-art { background: transparent; }
}


/* Keep the original wide fade, with one quarter of its original intensity. */
@media (min-width: 641px) {
 .profile-backdrop .profile-scene::after,
 .profile-backdrop .profile-art::after { opacity: .25; }
}

@media (max-width: 640px) {
 .profile-backdrop:not(.profile-wish-standard) .profile-scene { height: 220px; }
}
