/* Seven independent collections; the final row stays readable on phones. */
.role-switch {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.role-switch [data-character] {
  grid-column: auto;
  font-size: 13px;
}
@media (max-width: 1100px) and (min-width: 761px) {
  .role-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-switch [data-character="female5"] { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .role-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .role-switch [data-character="female5"] { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .role-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* v42（徐博士：「雪鈴的 36 件裝備圖示移除」）：雪鈴沒有裝備圖集了——圖鑑、裝備欄、抽獎結果都改成一個字的圓章
   （app.js art() 設 data-glyph：簪、紗、耳、墜…犬、額、圈…；外圈顏色跟寶物稀有度 --rarity）。守護神欄的哈士奇圖示（data-guardian-icon）不受影響。 */
body .item-art.snow:not([data-guardian-icon]) {
  background-image:
    radial-gradient(circle, transparent 0 58%, color-mix(in srgb, var(--rarity, #9ab0b8) 78%, #fff) 59.5% 63.5%, transparent 65%),
    radial-gradient(circle at 50% 32%, #ffffffe6 0, #ffffff00 28%),
    radial-gradient(circle, #f4f9f7 0, #e6f0ec 45%, #d6e7e1 63%, transparent 64.5%);
  background-size: 100% 100% !important; background-position: 50% 50% !important; background-repeat: no-repeat;
  display: grid; place-items: center; container-type: size;
}
body .item-art.snow:not([data-guardian-icon])::before {
  content: attr(data-glyph);
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", DrHsuTC, Georgia, serif; font-weight: 700; line-height: 1;
  font-size: 30px; font-size: 42cqmin;
  color: color-mix(in srgb, var(--rarity, #6f9c90) 62%, #23413b);
  text-shadow: 0 1px 0 #fff;
}


/* Jade, moon-white silk and blush ribbons frame Snow Ling's ancient attire. */
body[data-character="female5"] .character-panel {
  border-color: #b4c7b078;
  background: linear-gradient(145deg, #223d3d, #152b31 66%, #263a3b);
}
body[data-character="female5"] .level-tag {
  border-color: #abd4c75e;
  color: #d8f1e5;
}
body[data-character="female5"] .role-switch {
  border-color: #a8cabb4d;
  background: #0e2529cc;
}
body[data-character="female5"] .role-switch button.active {
  color: #fff5df;
  background: linear-gradient(135deg, #54796a, #36574f);
  box-shadow: inset 0 0 0 1px #eadabb24;
}
body[data-character="female5"] .character-stage {
  container-type: inline-size;
  --stage-arch: #8fae9f55;
  background: radial-gradient(ellipse at 48% 27%, #fffef6 0, #edf4eb 45%, #c9dedb 112%);
  border-top-color: #b8c9b94d;
  border-bottom-color: #b8c9b94d;
}
body[data-character="female5"] .character-stage::before {
  background: radial-gradient(ellipse at 11% 45%, #eed0ce2a, transparent 37%),
    radial-gradient(ellipse at 94% 77%, #78c4c529, transparent 40%),
    linear-gradient(115deg, transparent 21%, #ffffff45 22%, transparent 24%);
}
body[data-character="female5"] .portal {
  border-color: var(--stage-arch);
  border-bottom-color: transparent;
}
body[data-character="female5"] .portal::before { inset: 14px; }
body[data-character="female5"] .character-sprite {
  background-image: none;
  filter: drop-shadow(0 7px 8px #345b5724);
}
body[data-character="female5"] .wardrobe-layer { filter: none; }
body[data-character="female5"] .orbit-view { filter: drop-shadow(0 7px 8px #345b5724); }
body[data-character="female5"] .stage-floor {
  width: 246px;
  height: 23px;
  background: radial-gradient(ellipse, #526a612b, #77968e12 46%, transparent 75%);
}
body[data-character="female5"] .mount-companion {
  color: #3d645c;
  text-shadow: 0 1px 1px #fffcf3;
}
body[data-character="female5"] .gear-pin { background-color: #173f3cdb; }
body[data-character="female5"] .preview-label {
  background: #3b5964ef;
  border-color: #c8bf96;
  color: #fff4de;
}
body[data-character="female5"] .character-caption {
  padding-top: 21px;
  padding-bottom: 19px;
  gap: 16px;
  align-items: flex-start;
}
body[data-character="female5"] .character-caption h2 {
  color: #fff1db;
  font-size: 28px;
  letter-spacing: .16em;
}
body[data-character="female5"] .character-caption p { color: #c7dcd3; }
body[data-character="female5"] .character-caption > .text-button { margin-top: 9px; }
body[data-character="female5"] .portrait-button {
  min-height: 88px;
  gap: 13px;
  padding: 5px 14px 5px 5px;
  border-color: #a9c2b580;
  background: linear-gradient(140deg, #f0e7c712, #c5eae407);
  box-shadow: inset 0 0 0 1px #e0f1df0d;
}
body[data-character="female5"] .portrait-thumbnail {
  flex: 0 0 66px;
  width: 66px;
  height: 76px;
  border-color: #c4ccab8c;
  background: #eff5eb;
}
body[data-character="female5"] .portrait-thumbnail img {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 23%;
}
body[data-character="female5"] .portrait-button:hover {
  border-color: #e1d5ad;
  background: #d9f3e41c;
}
body[data-character="female5"] .portrait-button:focus-visible { outline-color: #d8dfb3; }
body[data-character="female5"] .heroine-view-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
body[data-character="female5"] .heroine-view-label {
  color: #cde3d7;
  font-size: 12px;
  letter-spacing: .08em;
  white-space: nowrap;
}
body[data-character="female5"] .heroine-view-modes {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #b2c6b850;
  border-radius: 9px;
  background: #122a31;
}
body[data-character="female5"] .heroine-view-button {
  min-height: 40px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #d1e3db;
  background: transparent;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  touch-action: manipulation;
}
body[data-character="female5"] .heroine-view-button[aria-pressed="true"],
body[data-character="female5"] .orbit-mode-button[aria-pressed="true"] {
  color: #fff2d9;
  background: linear-gradient(135deg, #567d6c, #35574d);
  border-color: #d4d2a545;
}
body[data-character="female5"] .heroine-view-button:hover:not(:disabled) {
  color: #fff9e9;
  border-color: #bbcda670;
}
body[data-character="female5"] .heroine-view-button:focus-visible {
  outline: 2px solid #d4dfb5;
  outline-offset: 3px;
}
body[data-character="female5"] .orbit-angle-range { accent-color: #b6d6bc; }
body[data-character="female5"] .orbit-angle-label { color: #d0e6db; }
body[data-character="female5"] .orbit-explainer { color: #b6d5c9; }
body[data-character="female5"] .portrait-dialog {
  background: #f2f6eb;
  border-color: #9eae86;
  color: #3f6257;
}
body[data-character="female5"] .portrait-heading h2 { color: #46624d; }
body[data-character="female5"] .portrait-heading p,
body[data-character="female5"] .portrait-note { color: #728b7d; }
body[data-character="female5"] .portrait-frame {
  background: radial-gradient(ellipse at 50% 30%, #fffdf5, #edf4eb 77%, #cbded1);
}
@media (max-width: 1100px) and (min-width: 761px) {
  body[data-character="female5"] .character-caption { gap: 10px; }
  body[data-character="female5"] .character-caption > .text-button { font-size: 12px; }
}
@media (max-width: 760px) {
  body[data-character="female5"] .stage-floor { width: 204px; }
  body[data-character="female5"] .character-caption { gap: 9px; padding: 19px 21px 16px; }
  body[data-character="female5"] .character-caption h2 { font-size: 25px; }
  body[data-character="female5"] .character-caption > .text-button { margin-top: 6px; }
  body[data-character="female5"] .portrait-button { min-height: 82px; gap: 9px; padding-right: 10px; }
  body[data-character="female5"] .portrait-thumbnail { flex-basis: 60px; width: 60px; height: 70px; }
}
@media (max-width: 420px) {
  body[data-character="female5"] .character-caption { padding-right: 17px; padding-left: 17px; gap: 8px; }
  body[data-character="female5"] .character-caption h2 { font-size: 23px; }
  body[data-character="female5"] .portrait-button { min-height: 78px; font-size: 11px; }
  body[data-character="female5"] .portrait-thumbnail { flex-basis: 56px; width: 56px; height: 66px; }
  body[data-character="female5"] .heroine-view-selector { gap: 7px; }
  body[data-character="female5"] .heroine-view-button { padding-right: 10px; padding-left: 10px; }
}

.character-height{display:inline-block;margin:2px 0 7px;padding:2px 8px;border:1px solid #d8c6a640;border-radius:20px;color:#cfdecf;font-size:11px;letter-spacing:.08em;}

@media (max-width: 420px) {
  body[data-character="female5"] .gear-pin:nth-of-type(5),
  body[data-character="female5"] .gear-pin:nth-of-type(6) { display: none; }
}
