/* Each adventure keeps a compact, readable chooser at every viewport. */
.role-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.role-switch [data-character] {
  grid-column: auto;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 6px;
  font-size: 13px;
  white-space: nowrap;
}
@media (max-width: 1100px) and (min-width: 761px), (max-width: 420px) {
  .role-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-switch [data-character="female3"] { grid-column: auto; }
}

/* The scholar's equipment remains independent of all other collections. */
body .item-art.scholar { background-image: url('assets/female4-gear-atlas.png?v=ab727604'); }

/* Ivory parchment, midnight blue and restrained burgundy academic details. */
body[data-character="female4"] .character-panel {
  border-color: #b49a7275;
  background: linear-gradient(145deg, #293041, #1c2435 60%, #30212b);
}
body[data-character="female4"] .level-tag {
  border-color: #a994665e;
  color: #eddbc0;
}
body[data-character="female4"] .role-switch {
  border-color: #b49a724d;
  background: #141b2acc;
}
body[data-character="female4"] .role-switch button.active {
  background: linear-gradient(135deg, #74424a, #502b3c);
  box-shadow: inset 0 0 0 1px #bd9b672e;
  color: #fff2d9;
}
body[data-character="female4"] .character-stage {
  container-type: inline-size;
  --stage-arch: #b99a6252;
  background: radial-gradient(ellipse at 49% 28%, #fffdf5 0, #f1ece2 43%, #c8c6d0 112%);
  border-top-color: #c5aa774d;
  border-bottom-color: #c5aa774d;
}
body[data-character="female4"] .character-stage::before {
  background: radial-gradient(ellipse at 8% 40%, #d6b48f28, transparent 37%),
    radial-gradient(ellipse at 94% 78%, #787eae1a, transparent 40%),
    linear-gradient(115deg, transparent 21%, #fffaf93d 22%, transparent 24%);
}
body[data-character="female4"] .portal { border-color: var(--stage-arch); border-bottom-color: transparent; }
body[data-character="female4"] .portal::before { inset: 14px; }
body[data-character="female4"] .character-sprite {
  /* Native artwork and measured dimensions are supplied by framing.js. */
  background-image: none;
  filter: drop-shadow(0 7px 8px #3e30442b);
}
body[data-character="female4"] .wardrobe-layer { filter: none; }
body[data-character="female4"] .orbit-view { filter: drop-shadow(0 7px 8px #3e30442b); }
body[data-character="female4"] .stage-floor {
  width: 246px;
  height: 23px;
  background: radial-gradient(ellipse, #5950632b, #80718812 46%, transparent 75%);
}
body[data-character="female4"] .mount-companion {
  color: #62506c;
  text-shadow: 0 1px 1px #fff9ee;
}
body[data-character="female4"] .gear-pin { background-color: #2f293ddb; }
body[data-character="female4"] .preview-label {
  background: #492b40ef;
  border-color: #cbb586;
  color: #fff4de;
}
body[data-character="female4"] .character-caption {
  padding-top: 21px;
  padding-bottom: 19px;
  gap: 16px;
  align-items: flex-start;
}
body[data-character="female4"] .character-caption h2 {
  color: #fff1db;
  font-size: 28px;
  letter-spacing: .16em;
}
body[data-character="female4"] .character-caption p { color: #d4c8d3; }
body[data-character="female4"] .character-caption > .text-button { margin-top: 9px; }
body[data-character="female4"] .portrait-button {
  min-height: 88px;
  gap: 13px;
  padding: 5px 14px 5px 5px;
  border-color: #c4a77680;
  background: linear-gradient(140deg, #f0d4aa12, #d6d5e907);
  box-shadow: inset 0 0 0 1px #efe0c00d;
}
body[data-character="female4"] .portrait-thumbnail {
  flex: 0 0 66px;
  width: 66px;
  height: 76px;
  border-color: #d2b98d8c;
  background: #f6f0e7;
}
body[data-character="female4"] .portrait-thumbnail img {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 23%;
}
body[data-character="female4"] .portrait-button:hover {
  border-color: #dcc089;
  background: #efcfaa1c;
}
body[data-character="female4"] .portrait-button:focus-visible { outline-color: #e5c78b; }
body[data-character="female4"] .heroine-view-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
body[data-character="female4"] .heroine-view-label {
  color: #d7cbda;
  font-size: 12px;
  letter-spacing: .08em;
  white-space: nowrap;
}
body[data-character="female4"] .heroine-view-modes {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #b4a08050;
  border-radius: 9px;
  background: #182137;
}
body[data-character="female4"] .heroine-view-button {
  min-height: 40px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #d7cfe0;
  background: transparent;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  touch-action: manipulation;
}
body[data-character="female4"] .heroine-view-button[aria-pressed="true"],
body[data-character="female4"] .orbit-mode-button[aria-pressed="true"] {
  color: #fff2d9;
  background: linear-gradient(135deg, #75464e, #503042);
  border-color: #c6ae7845;
}
body[data-character="female4"] .heroine-view-button:hover:not(:disabled) {
  color: #fff9e9;
  border-color: #baa27070;
}
body[data-character="female4"] .heroine-view-button:focus-visible {
  outline: 2px solid #e0c59a;
  outline-offset: 3px;
}
body[data-character="female4"] .orbit-angle-range { accent-color: #cdbb8f; }
body[data-character="female4"] .orbit-angle-label { color: #ded0e3; }
body[data-character="female4"] .orbit-explainer { color: #c9bdd5; }
body[data-character="female4"] .portrait-dialog {
  background: #f5efe5;
  border-color: #b69963;
  color: #51465f;
}
body[data-character="female4"] .portrait-heading h2 { color: #553e56; }
body[data-character="female4"] .portrait-heading p,
body[data-character="female4"] .portrait-note { color: #7d6d82; }
body[data-character="female4"] .portrait-frame {
  background: radial-gradient(ellipse at 50% 30%, #fffdf5, #f1ebe3 77%, #d0c9d8);
}
@media (max-width: 1100px) and (min-width: 761px) {
  body[data-character="female4"] .character-caption { gap: 10px; }
  body[data-character="female4"] .character-caption > .text-button { font-size: 12px; }
}
@media (max-width: 760px) {
  body[data-character="female4"] .stage-floor { width: 204px; }
  body[data-character="female4"] .character-caption { gap: 9px; padding: 19px 21px 16px; }
  body[data-character="female4"] .character-caption h2 { font-size: 25px; }
  body[data-character="female4"] .character-caption > .text-button { margin-top: 6px; }
  body[data-character="female4"] .portrait-button { min-height: 82px; gap: 9px; padding-right: 10px; }
  body[data-character="female4"] .portrait-thumbnail { flex-basis: 60px; width: 60px; height: 70px; }
}
@media (max-width: 370px) {
  body[data-character="female4"] .character-caption { padding-right: 17px; padding-left: 17px; gap: 8px; }
  body[data-character="female4"] .character-caption h2 { font-size: 23px; }
  body[data-character="female4"] .portrait-button { min-height: 78px; font-size: 11px; }
  body[data-character="female4"] .portrait-thumbnail { flex-basis: 56px; width: 56px; height: 66px; }
  body[data-character="female4"] .heroine-view-selector { gap: 7px; }
  body[data-character="female4"] .heroine-view-button { padding-right: 10px; padding-left: 10px; }
}
