/* The heroine has a mist-blue gallery and larger viewing area. Male presentation
   and all equipment/collection behavior continue to use the existing styles. */
body[data-role="female"] .character-panel {
  border-color: #927b6a79;
  background: linear-gradient(145deg, #26302d, #142321 76%);
}
body[data-role="female"] .character-stage {
  height: 600px;
  --stage-arch: #b49a743d;
  background:
    radial-gradient(ellipse at 51% 27%, #fffdf8 0, #eaf0f1 43%, #becdd2 108%);
  border-top-color: #dbc9a84a;
  border-bottom-color: #b9a58e54;
}
body[data-role="female"] .character-stage::before {
  background:
    radial-gradient(ellipse at 16% 40%, #d6e5ef3b, transparent 35%),
    radial-gradient(ellipse at 87% 76%, #9bb8c02b, transparent 40%),
    linear-gradient(116deg, transparent 21%, #ffffff29 22%, transparent 23%);
}
body[data-role="female"] .portal {
  top: 32px;
  height: 514px;
  width: min(382px, 86%);
  border-color: var(--stage-arch);
  border-bottom-color: transparent;
}
body[data-role="female"] .portal::before { inset: 14px; }
body[data-role="female"] .character-sprite {
  top: 12px;
  height: 580px;
  width: 193.3333px;
  filter: drop-shadow(0 7px 8px #6a5c4f26);
}
body[data-role="female"] .wardrobe-layer { filter: none; }
body[data-role="female"] .orbit-view {
  top: 12px;
  height: 580px;
  width: 290px;
  filter: drop-shadow(0 7px 8px #6a5c4f26);
}
body[data-role="female"] .stage-floor {
  width: 246px;
  bottom: 4px;
  height: 23px;
  background: radial-gradient(ellipse, #6e645c29, #716c6012 46%, transparent 75%);
}
body[data-role="female"] .mount-companion {
  color: #705e48;
  text-shadow: 0 1px 1px #fff9ed;
}
.stage-identity { display: none; }
body[data-role="female"] .stage-identity {
  display: block;
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 8;
}
body[data-role="female"] .gear-pin:nth-child(1) { top: 35%; }
body[data-role="female"] .gear-pin:nth-child(2) { top: 41%; }
body[data-role="female"] .character-caption {
  padding-top: 21px;
  padding-bottom: 18px;
  gap: 18px;
}
body[data-role="female"] .character-caption h2 {
  color: #f4e5cc;
  font-size: 28px;
  letter-spacing: .16em;
}
body[data-role="female"] .character-caption p { color: #c5c5b5; }
body[data-role="female"] .portrait-button {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 108px;
  height: 146px;
  margin: 0;
  padding: 5px;
  border-color: #b49b76aa;
  border-radius: 9px;
  color: #826447;
  background: linear-gradient(145deg, #fffdf7ef, #e1eaebee);
  box-shadow: 0 4px 12px #6b5c4914, inset 0 0 0 2px #fffcf267;
  font-size: 10px;
  letter-spacing: .09em;
  line-height: 16px;
}
body[data-role="female"] .portrait-thumbnail {
  flex: 0 0 114px;
  width: 96px;
  height: 114px;
  border-color: #c1a47d55;
  border-radius: 4px;
  background: #eaf0f1;
}
body[data-role="female"] .portrait-thumbnail img {
  top: -5px;
  left: -46px;
  width: 184px;
}
body[data-role="female"] .portrait-button-label::after { color: #9e7e57; font-size: 13px; }
body[data-role="female"] .portrait-button:hover {
  border-color: #927044;
  background: #fffbf2;
}
body[data-role="female"] .portrait-button:focus-visible { outline-color: #efd0aa; }
body[data-role="female"] .orbit-mode-button[aria-pressed="true"] {
  background: #59604e;
  color: #fff5e4;
}
body[data-role="female"] .orbit-angle-range { accent-color: #cfbea0; }
body[data-role="female"] .portrait-dialog {
  background: #f1f4f3;
  border-color: #b39877;
  color: #68554b;
}
body[data-role="female"] .portrait-heading {
  border-bottom-color: #b998772b;
}
body[data-role="female"] .portrait-heading h2 { color: #6a5548; }
body[data-role="female"] .portrait-heading p { color: #927969; }
body[data-role="female"] .portrait-frame {
  background: radial-gradient(ellipse at 50% 32%, #fffdf8, #e5edf0 77%, #bfced5);
}
body[data-role="female"] .portrait-note { color: #927969; }
body[data-role="female"] .portrait-close {
  border-color: #b8a08680;
  color: #7d6554;
  background: #fffaf2c2;
}
body[data-role="female"] .portrait-close:hover { background: #fffaf2; border-color: #9d8164; }
body[data-role="female"] .portrait-close:focus-visible { outline-color: #b08b64; }

/* Crop the existing full-size artwork, preserving its proportions and every
   orbit angle. The full view remains the default and shows the complete outfit. */
.heroine-view-selector { display: none; }
body[data-role="female"] .heroine-view-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
body[data-role="female"] .heroine-view-label {
  color: #c7b99b;
  font-size: 12px;
  letter-spacing: .08em;
  white-space: nowrap;
}
body[data-role="female"] .heroine-view-modes {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #8e876850;
  border-radius: 9px;
  background: #101e21;
}
body[data-role="female"] .heroine-view-button {
  min-height: 40px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #b8c8c9;
  background: transparent;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  touch-action: manipulation;
}
body[data-role="female"] .heroine-view-button[aria-pressed="true"] {
  color: #fff8e9;
  background: linear-gradient(135deg, #52696b, #344e53);
  border-color: #a89b743f;
}
body[data-role="female"] .heroine-view-button:hover:not(:disabled) {
  color: #fffaf0;
  border-color: #b19e6670;
}
body[data-role="female"] .heroine-view-button:focus-visible {
  outline: 2px solid #e0c59a;
  outline-offset: 3px;
}
body[data-role="female"][data-heroine-view="near"] .character-stage {
  overflow: hidden;
  overflow: clip;
}
body[data-role="female"][data-heroine-view="near"] .orbit-view {
  top: 8px;
  height: 1050px;
  width: 525px;
}
body[data-role="female"][data-heroine-view="near"] .character-sprite {
  top: 8px;
  height: 1050px;
  width: 350px;
}
body[data-role="female"][data-heroine-view="near"] .stage-identity {
  top: auto;
  bottom: 24px;
}
body[data-role="female"][data-heroine-view="near"] .gear-pins,
body[data-role="female"][data-heroine-view="near"] .mount-companion,
body[data-role="female"][data-heroine-view="near"] .stage-floor {
  visibility: hidden;
}
@media (max-width: 1100px) and (min-width: 761px) {
  body[data-role="female"] .character-stage { height: 570px; }
  body[data-role="female"] .character-sprite { height: 550px; width: 183.3333px; }
  body[data-role="female"] .orbit-view { height: 550px; width: 275px; }
  body[data-role="female"] .portal { height: 490px; width: 86%; }
  body[data-role="female"] .stage-identity { left: 14px; }
  body[data-role="female"] .portrait-button { width: 94px; height: 128px; }
  body[data-role="female"] .portrait-thumbnail { flex-basis: 96px; width: 82px; height: 96px; }
  body[data-role="female"] .portrait-thumbnail img { left: -39px; top: -4px; width: 158px; }
  body[data-role="female"][data-heroine-view="near"] .orbit-view { height: 930px; width: 465px; }
  body[data-role="female"][data-heroine-view="near"] .character-sprite { height: 930px; width: 310px; }
}
@media (max-width: 760px) {
  body[data-role="female"] .character-stage { height: 490px; }
  body[data-role="female"] .character-sprite { top: 11px; height: 470px; width: 156.6667px; }
  body[data-role="female"] .orbit-view { top: 11px; height: 470px; width: 235px; }
  body[data-role="female"] .portal { top: 27px; height: 416px; width: min(306px, 86%); }
  body[data-role="female"] .stage-floor { width: 204px; }
  body[data-role="female"] .character-caption { gap: 9px; padding: 19px 21px 16px; }
  body[data-role="female"] .character-caption h2 { font-size: 25px; }
  body[data-role="female"] .character-caption > .text-button { align-self: flex-start; margin-top: 5px; }
  body[data-role="female"] .stage-identity { top: 18px; left: 12px; }
  body[data-role="female"] .portrait-button { width: 78px; height: 108px; gap: 3px; padding: 4px; font-size: 9px; line-height: 14px; }
  body[data-role="female"] .portrait-thumbnail { flex-basis: 79px; width: 68px; height: 79px; }
  body[data-role="female"] .portrait-thumbnail img { top: -4px; left: -32px; width: 132px; }
  body[data-role="female"][data-heroine-view="near"] .orbit-view { top: 8px; height: 850px; width: 425px; }
  body[data-role="female"][data-heroine-view="near"] .character-sprite { top: 8px; height: 850px; width: 283.3333px; }
  body[data-role="female"][data-heroine-view="near"] .stage-identity { bottom: 22px; }
}
@media (max-width: 370px) {
  body[data-role="female"] .character-stage { height: 480px; }
  body[data-role="female"] .character-sprite { height: 460px; width: 153.3333px; }
  body[data-role="female"] .orbit-view { height: 460px; width: 230px; }
  body[data-role="female"] .portal { height: 404px; width: 258px; }
  body[data-role="female"] .character-caption { padding-right: 17px; padding-left: 17px; gap: 8px; }
  body[data-role="female"] .character-caption h2 { font-size: 23px; }
  body[data-role="female"] .stage-identity { top: 16px; left: 10px; }
  body[data-role="female"] .portrait-button { width: 74px; height: 102px; }
  body[data-role="female"] .portrait-thumbnail { flex-basis: 73px; width: 64px; height: 73px; }
  body[data-role="female"] .portrait-thumbnail img { top: -3px; left: -29px; width: 122px; }
  body[data-role="female"] .heroine-view-selector { gap: 7px; }
  body[data-role="female"] .heroine-view-button { padding-right: 10px; padding-left: 10px; }
  body[data-role="female"][data-heroine-view="near"] .orbit-view { height: 800px; width: 400px; }
  body[data-role="female"][data-heroine-view="near"] .character-sprite { height: 800px; width: 266.6667px; }
  body[data-role="female"][data-heroine-view="near"] .stage-identity { bottom: 22px; }
}

/* v16：星曜（data-character="male"）的「人物取景」——框架樣式沿用寶庫深色調；近景的尺寸由 framing.js 算（human 頭頂對齊） */
body[data-character="male"] .heroine-view-selector { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
body[data-character="male"] .heroine-view-label { color: var(--muted); font-size: 12px; letter-spacing: .08em; white-space: nowrap; }
body[data-character="male"] .heroine-view-modes { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #09181e; }
body[data-character="male"] .heroine-view-button { min-height: 40px; padding: 7px 13px; border: 1px solid transparent; border-radius: 6px; color: var(--muted); background: transparent; font-size: 12px; line-height: 1.5; white-space: nowrap; touch-action: manipulation; }
body[data-character="male"] .heroine-view-button[aria-pressed="true"] { color: #effffb; background: #25414a; border-color: #3a535c; box-shadow: 0 2px 8px #0003; }
body[data-character="male"] .heroine-view-button:hover:not(:disabled) { color: #effffb; border-color: var(--cyan); }
body[data-character="male"] .heroine-view-button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
body[data-character="male"][data-heroine-view="near"] .character-stage { overflow: hidden; overflow: clip; }
body[data-character="male"][data-heroine-view="near"] .gear-pins,
body[data-character="male"][data-heroine-view="near"] .mount-companion,
body[data-character="male"][data-heroine-view="near"] .stage-floor { visibility: hidden; }
