/* Anonymous background characters use individual transparent sprites. */
.gal-stage[data-npc] .gal-person { visibility: hidden; }
.gal-npc-person { position: absolute; left: 50%; bottom: -7%; height: 108%; width: 68%; transform: translateX(-50%); pointer-events: none; filter: brightness(.9) saturate(.87); transition: filter .3s; }
.gal-npc-person img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; display: block; user-select: none; }
.gal-npc-person[data-type="woman"] { height: 102%; }
.gal-npc-person[data-type^="student-"] { height: 100%; bottom: -5%; }
.gal-npc-person[data-type="elder"], .gal-npc-person[data-type="grandma"] { height: 98%; }
.gal-npc-person:is([data-type="child"], [data-type="girl"]) { height: 73%; bottom: 1%; }
.gal-npc-person.is-speaking { filter: brightness(1.03) saturate(1); }
.gal-toolbar button:disabled { opacity: .45; cursor: default; transform: none; }
.gal-npc-picker { box-sizing: border-box; width: min(720px, calc(100vw - 36px)); max-height: calc(100dvh - 36px); padding: 0; overflow-y: auto; border: 1px solid #fff9e4; border-radius: 21px; color: #36544a; background: #f8f3e5; box-shadow: 0 24px 100px #122f4650; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
.gal-npc-picker::backdrop { background: #183e4270; backdrop-filter: blur(6px); }
.gal-npc-picker *, .gal-npc-picker *::before, .gal-npc-picker *::after { box-sizing: border-box; }
.gal-npc-picker button { font: inherit; cursor: pointer; }
.gal-npc-picker button:focus-visible { outline: 3px solid #b98b43; outline-offset: 3px; }
.gal-npc-picker > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding: 24px 26px 19px; border-bottom: 1px solid #d8cbae; }
.gal-npc-picker header span { font-size: 9px; letter-spacing: 2px; color: #8c9d86; }
.gal-npc-picker h2 { margin: 6px 0 8px; font-size: 25px; font-weight: 500; letter-spacing: 3px; }
.gal-npc-picker header p { margin: 0; color: #829381; font-size: 12px; }
.gal-npc-close { display: grid; place-items: center; width: 33px; height: 33px; padding: 0; flex: none; border: 1px solid #d4c7aa; border-radius: 50%; color: #78907c; background: transparent; font-size: 24px !important; }
.gal-npc-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; padding: 22px 26px; }
.gal-npc-options > button { min-width: 0; padding: 10px 8px 13px; border: 1px solid #d9cfb8; border-radius: 12px 17px 12px 17px; background: #fffcf3; color: #4d6958; text-align: center; transition: background .2s, border-color .2s; }
.gal-npc-options > button:hover, .gal-npc-options > button[aria-pressed="true"] { border-color: #87a58d; background: #e9efdf; }
.gal-npc-thumbnail { position: relative; display: flex; justify-content: center; align-items: flex-end; height: 166px; overflow: hidden; border-radius: 9px; background: linear-gradient(145deg, #e5e6d9, #f7f0da); }
.gal-npc-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.gal-npc-thumbnail:is([data-type="child"], [data-type="girl"]) img { height: 82%; }
.gal-npc-options b { display: block; margin-top: 11px; font-size: 13px; font-weight: 500; letter-spacing: 1px; }
.gal-npc-options small { display: block; margin-top: 6px; color: #8e9b85; font-size: 10px; }
.gal-npc-picker > footer { display: flex; justify-content: flex-end; padding: 15px 26px; border-top: 1px solid #d8cbae; background: #f0ead8; }
.gal-npc-picker footer button { display: flex; gap: 23px; align-items: center; padding: 11px 17px; border: 1px solid #b2bd9c; border-radius: 9px; background: #fffbee; color: #5d7d63; font-size: 12px; }
@media (max-height: 540px) and (orientation: landscape) {
  .gal-npc-person { height: 113%; bottom: -17%; }
  .gal-npc-person[data-type="woman"] { height: 108%; }
  .gal-npc-person[data-type="elder"], .gal-npc-person[data-type="grandma"] { height: 104%; }
  .gal-npc-person:is([data-type="child"], [data-type="girl"]) { height: 87%; bottom: -7%; }
  .gal-npc-picker { width: min(660px, calc(100vw - 28px)); max-height: calc(100dvh - 20px); }
  .gal-npc-picker > header { padding: 12px 20px 10px; }
  .gal-npc-picker h2 { font-size: 20px; margin: 3px 0 4px; }
  .gal-npc-picker header p { font-size: 10px; }
  .gal-npc-options { padding: 12px 20px; gap: 10px; }
  .gal-npc-thumbnail { height: 112px; }
  .gal-npc-options b { margin-top: 6px; font-size: 12px; }
  .gal-npc-options small { margin-top: 4px; font-size: 9px; }
  .gal-npc-picker > footer { padding: 9px 20px; }
  .gal-npc-picker footer button { padding: 7px 14px; font-size: 11px; }
}
@media (max-width: 520px) and (orientation: portrait) {
  .gal-npc-person { height: 106%; bottom: -14%; }
  .gal-npc-person[data-type="woman"] { height: 103%; }
  .gal-npc-person[data-type="elder"], .gal-npc-person[data-type="grandma"] { height: 99%; }
  .gal-npc-person:is([data-type="child"], [data-type="girl"]) { height: 86%; bottom: -7%; }
  .gal-npc-picker { width: calc(100vw - 28px); }
  .gal-npc-picker > header { padding: 18px; }
  .gal-npc-picker h2 { font-size: 22px; }
  .gal-npc-options { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px 18px; gap: 12px; }
  .gal-npc-thumbnail { height: 136px; }
  .gal-npc-picker > footer { padding: 12px 18px; }
}
