/* Item art follows its equipment owner, including rewards and mounted gear.
   Presentation themes never change another character's equipment icons. */
/* v57（2026-10-20）：星曜的 36 件換成新參考圖的裝備圖集（tools/import_v57.py／ref57/atlas57.py；舊的 equipment-atlas.png 不再使用） */
body .item-art[data-equipment-role="male"] {
  background-image: url('assets/male-gear-atlas.png?v=03be4025');
}
body .item-art.female {
  background-image: url('assets/female-atlas.png?v=c56c641e');
}
/* v58（2026-10-22）：星澄初裝「清新素雅」自己的 36 件圖集（tools/import_v58.py／ref58/atlas58.py）；經典／史詩／傳說仍用上面的 female-atlas.png */
body .item-art.female[data-tier="0"] {
  background-image: url('assets/female-gear-atlas-0.png?v=ac4b6f12');
}
body .item-art.knight {
  background-image: url('assets/male2-gear-atlas.png?v=6d4dd238');
}

/* v28：星珩的「月白北境」舞臺（淡紫灰、月白、冰藍與銀——v22 武俠造型）；只屬於 male2，裝備與存檔仍用引擎 knight。
   Star Heng's moonlit northern gallery belongs only to the male2 profile. */
body[data-character="male2"] .character-panel {
  border-color: #aba6cf70;
  background: linear-gradient(142deg, #2c2f4c, #181b30 78%);
}
body[data-character="male2"] .character-stage {
  height: 600px;
  --stage-arch: #a9a3cf45;
  background: radial-gradient(ellipse at 50% 27%, #fdfcff 0, #eeedf6 42%, #b9bedd 108%);
  border-top-color: #c9c3e659;
  border-bottom-color: #a9aecb5c;
}
body[data-character="male2"] .character-stage::before {
  background: radial-gradient(ellipse at 12% 43%, #a9a6d424, transparent 37%),
    radial-gradient(ellipse at 92% 76%, #6a68a01f, transparent 40%),
    linear-gradient(116deg, transparent 22%, #fdfcff3b 23%, transparent 24%);
}
body[data-character="male2"] .portal {
  top: 32px;
  height: 514px;
  width: min(382px, 86%);
  border-color: var(--stage-arch);
  border-bottom-color: transparent;
}
body[data-character="male2"] .portal::before { inset: 14px; }
body[data-character="male2"] .character-sprite {
  /* Keep the original 1446 × 1087 sheet cell ratio, including its gutters. */
  top: -170px;
  height: 920px;
  width: 305.9614px;
  
  filter: drop-shadow(0 7px 8px #4a46732a);
}
body[data-character="male2"] .wardrobe-layer { filter: none; }
body[data-character="male2"] .head-layer { clip-path: polygon(20% 0, 80% 0, 85% 35%, 15% 35%); }
body[data-character="male2"] .body-layer { clip-path: polygon(14% 34%, 86% 34%, 82% 62%, 18% 62%); }
body[data-character="male2"] .arms-layer { clip-path: polygon(0 34%, 20% 34%, 25% 61%, 75% 61%, 80% 34%, 100% 34%, 100% 64%, 0 64%); }
body[data-character="male2"] .legs-layer { clip-path: polygon(18% 60%, 82% 60%, 88% 77%, 12% 77%); }
body[data-character="male2"] .feet-layer { clip-path: polygon(10% 76%, 90% 76%, 100% 100%, 0 100%); }
body[data-character="male2"] .orbit-view {
  top: 12px;
  height: 580px;
  width: 290px;
  filter: drop-shadow(0 7px 8px #4a46732a);
}
/* The legacy prince's atlas-specific gutter correction does not apply here. */
body[data-character="male2"] .orbit-figure { clip-path: none; }
body[data-character="male2"] .stage-floor {
  width: 246px;
  bottom: 4px;
  height: 23px;
  background: radial-gradient(ellipse, #5a587e29, #7e7c9e12 46%, transparent 75%);
}
body[data-character="male2"] .mount-companion {
  color: #4f4a83;
  text-shadow: 0 1px 1px #f7f5ff;
}
body[data-character="male2"] .preview-label {
  position: static;
  transform: none;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 12px auto 0;
  white-space: normal;
  text-align: center;
  background: #2c2950e8;
  border-color: #bfb8e2;
  color: #f7f5ff;
}
body[data-character="male2"] .character-caption {
  padding-top: 21px;
  padding-bottom: 19px;
  gap: 16px;
  align-items: flex-start;
}
body[data-character="male2"] .character-caption h2 {
  color: #ece8ff;
  font-size: 28px;
  letter-spacing: .16em;
}
body[data-character="male2"] .character-caption p { color: #c7c9e2; }
body[data-character="male2"] .character-caption > .text-button { margin-top: 9px; }
body[data-character="male2"] .portrait-button {
  min-height: 88px;
  gap: 13px;
  padding: 5px 14px 5px 5px;
  border-color: #aca6d680;
  background: linear-gradient(140deg, #e2ddff12, #bcc2e607);
  box-shadow: inset 0 0 0 1px #c9c2ee0d;
}
body[data-character="male2"] .portrait-thumbnail {
  flex: 0 0 66px;
  width: 66px;
  height: 76px;
  border-color: #c3bde48c;
  background: #f1f0f7;
}
body[data-character="male2"] .portrait-thumbnail img {
  top: -1px;
  left: -40px;
  width: 143px;
}
body[data-character="male2"] .portrait-button:hover {
  border-color: #cbc4ee;
  background: #ddd6ff1c;
}
body[data-character="male2"] .portrait-button:focus-visible { outline-color: #d6cff5; }
body[data-character="male2"] .heroine-view-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
body[data-character="male2"] .heroine-view-label {
  color: #c7c1e6;
  font-size: 12px;
  letter-spacing: .08em;
  white-space: nowrap;
}
body[data-character="male2"] .heroine-view-modes {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #aaa4d250;
  border-radius: 9px;
  background: #1a1b33;
}
body[data-character="male2"] .heroine-view-button {
  min-height: 40px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #c5c8e2;
  background: transparent;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  touch-action: manipulation;
}
body[data-character="male2"] .heroine-view-button[aria-pressed="true"] {
  color: #f8f6ff;
  background: linear-gradient(135deg, #625e94, #3f3b6e);
  border-color: #bdb6e645;
}
body[data-character="male2"] .heroine-view-button:hover:not(:disabled) {
  color: #faf8ff;
  border-color: #b3acdf70;
}
body[data-character="male2"] .heroine-view-button:focus-visible {
  outline: 2px solid #d2cbf2;
  outline-offset: 3px;
}
body[data-character="male2"] .orbit-mode-button[aria-pressed="true"] {
  background: #555190;
  color: #f7f5ff;
}
body[data-character="male2"] .orbit-angle-range { accent-color: #b9b2e8; }
body[data-character="male2"] .orbit-angle-label { color: #d6d8ec; }
body[data-character="male2"] .orbit-explainer { color: #bcbfdc; }
body[data-character="male2"][data-heroine-view="near"] .character-stage {
  overflow: hidden;
  overflow: clip;
}
body[data-character="male2"][data-heroine-view="near"] .orbit-view {
  top: 8px;
  height: 1050px;
  width: 525px;
}
body[data-character="male2"][data-heroine-view="near"] .character-sprite {
  top: -320px;
  height: 1500px;
  width: 498.8500px;
}
body[data-character="male2"][data-heroine-view="near"] .gear-pins,
body[data-character="male2"][data-heroine-view="near"] .mount-companion,
body[data-character="male2"][data-heroine-view="near"] .stage-floor { visibility: hidden; }
body[data-character="male2"] .portrait-dialog {
  background: #f6f5fb;
  border-color: #a9a2cf;
  color: #45406f;
}
body[data-character="male2"] .portrait-heading h2 { color: #3d3868; }
body[data-character="male2"] .portrait-heading p,
body[data-character="male2"] .portrait-note { color: #6d6992; }
body[data-character="male2"] .portrait-frame {
  background: radial-gradient(ellipse at 50% 30%, #fdfcff, #eeedf6 77%, #c6c8e2);
}
@media (max-width: 1100px) and (min-width: 761px) {
  body[data-character="male2"] .character-stage { height: 570px; }
  body[data-character="male2"] .character-sprite { top: -160px; height: 870px; width: 289.3326px; }
  body[data-character="male2"] .orbit-view { height: 550px; width: 275px; }
  body[data-character="male2"] .portal { height: 490px; width: 86%; }
  body[data-character="male2"] .character-caption { gap: 10px; }
  body[data-character="male2"] .character-caption > .text-button { font-size: 12px; }
  body[data-character="male2"][data-heroine-view="near"] .orbit-view { height: 930px; width: 465px; }
  body[data-character="male2"][data-heroine-view="near"] .character-sprite { top: -300px; height: 1400px; width: 465.5934px; }
}
@media (max-width: 760px) {
  body[data-character="male2"] .character-stage { height: 490px; }
  body[data-character="male2"] .character-sprite { top: -145px; height: 735px; width: 244.4366px; }
  body[data-character="male2"] .orbit-view { top: 11px; height: 470px; width: 235px; }
  body[data-character="male2"] .portal { top: 27px; height: 416px; width: min(306px, 86%); }
  body[data-character="male2"] .stage-floor { width: 204px; }
  body[data-character="male2"] .character-caption { gap: 9px; padding: 19px 21px 16px; }
  body[data-character="male2"] .character-caption h2 { font-size: 25px; }
  body[data-character="male2"] .character-caption > .text-button { margin-top: 6px; }
  body[data-character="male2"] .portrait-button { min-height: 82px; gap: 9px; padding-right: 10px; }
  body[data-character="male2"] .portrait-thumbnail { flex-basis: 60px; width: 60px; height: 70px; }
  body[data-character="male2"] .portrait-thumbnail img { top: -1px; left: -37px; width: 131px; }
  body[data-character="male2"][data-heroine-view="near"] .orbit-view { top: 8px; height: 850px; width: 425px; }
  body[data-character="male2"][data-heroine-view="near"] .character-sprite { top: -265px; height: 1250px; width: 415.7084px; }
}
@media (max-width: 370px) {
  body[data-character="male2"] .character-stage { height: 480px; }
  body[data-character="male2"] .character-sprite { top: -141px; height: 720px; width: 239.4489px; }
  body[data-character="male2"] .orbit-view { height: 460px; width: 230px; }
  body[data-character="male2"] .portal { height: 404px; width: 258px; }
  body[data-character="male2"] .character-caption { padding-right: 17px; padding-left: 17px; gap: 8px; }
  body[data-character="male2"] .character-caption h2 { font-size: 23px; }
  body[data-character="male2"] .portrait-button { min-height: 78px; font-size: 11px; }
  body[data-character="male2"] .portrait-thumbnail { flex-basis: 56px; width: 56px; height: 66px; }
  body[data-character="male2"] .portrait-thumbnail img { top: -1px; left: -35px; width: 122px; }
  body[data-character="male2"] .heroine-view-selector { gap: 7px; }
  body[data-character="male2"] .heroine-view-button { padding-right: 10px; padding-left: 10px; }
  body[data-character="male2"][data-heroine-view="near"] .orbit-view { height: 800px; width: 400px; }
  body[data-character="male2"][data-heroine-view="near"] .character-sprite { top: -243px; height: 1150px; width: 382.4517px; }
}
