/* Scene-only compositing. Original painted talent cards remain separate. */
.avatar.reference-portrait.scene-character {
  background:transparent!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;overflow:visible;opacity:1!important;
  filter:drop-shadow(2px 4px 2px #271c1728)!important;
}
.scene-character img {
  width:100%;height:100%;display:block;object-fit:contain!important;
  object-position:center!important;background:transparent!important;
  border:0;border-radius:0;opacity:1!important;filter:none!important;
}
.scene-character::before {
  content:"";position:absolute;left:18%;right:18%;bottom:0;height:7%;
  border-radius:50%;background:radial-gradient(ellipse,#30271940,transparent 70%);
  z-index:-1;pointer-events:none;
}
.morning-room {isolation:isolate;background-size:cover;background-position:center;}
.morning-figure {inset:0;position:absolute;overflow:hidden;}
.morning-figure .avatar.reference-portrait.scene-character,
.morning-figure[data-framing=full] .avatar.reference-portrait.scene-character {
  inset:auto 8% 5%!important;left:auto!important;top:auto!important;
  transform:none!important;width:35%!important;height:auto!important;
  aspect-ratio:1;max-width:440px;
}
.morning-figure[data-framing=bust] .avatar.reference-portrait.scene-character,
.morning-figure[data-framing=bust] .avatar.reference-portrait.scene-character[data-original=true] {
  inset:6% auto auto 50%!important;transform:translateX(-50%)!important;
  width:min(90%,560px)!important;height:auto!important;aspect-ratio:1;
  max-width:none;
}
.morning-figure[data-framing=bust] .scene-character::before{display:none}
.hero .reference-portrait.scene-character,
.cutscene-art .reference-portrait.scene-character,
.cutscene-art.scene-7 .reference-portrait.scene-character,
.milestone-art .reference-portrait.scene-character,
.ending-portrait .reference-portrait.scene-character {
  inset:auto 5% -1px;left:auto;top:auto;transform:none;
  width:34%;height:auto;aspect-ratio:1;max-height:90%;
}
.hero:has(.scene-character){background-size:cover;animation:none}
.hero-caption{max-width:60%;z-index:2}
.hero-caption h2{font-size:clamp(16px,2vw,25px)}
.event-portrait{height:240px;background-position:center;background-size:cover}
.event-portrait .reference-portrait.scene-character{
  inset:auto 6% -1px;left:auto;transform:none;width:35%;height:auto;aspect-ratio:1;
}
.biography-portrait .reference-portrait.scene-character{
  inset:0;transform:none;width:100%;height:100%;
}
.ending-portrait{background:url('assets/office.webp') center/cover}
.talent-portrait,.talent-option[aria-pressed=true] .talent-portrait{height:180px}
.talent-portrait .card-original img{object-fit:cover;object-position:center 12%}
.talent-options{gap:9px}
.talent-option>span:nth-child(2){padding:9px}
.talent-option small{font-size:11px;line-height:1.4}
.creation-launch{
  position:fixed;left:50%;bottom:12px;transform:translateX(-50%);
  width:min(920px,calc(100% - 32px));z-index:15;
  background:#fff;border:1px solid #bedce0;border-radius:16px;
  box-shadow:0 4px 24px #123b4524;padding:12px 16px;
  display:grid;grid-template-columns:1fr minmax(230px,1fr);gap:16px;align-items:center;
}
.creation-launch #start-summary{margin:0;color:#244c60;line-height:1.6}
.creation-launch #start-summary b{color:#45687a}
.morning-page{padding-bottom:calc(140px + env(safe-area-inset-bottom))}
.creation-mode input,.creation-mode select{scroll-margin-bottom:150px}
.creation-mode #toast{bottom:140px}
@media(max-width:700px){
  .morning-figure .avatar.reference-portrait.scene-character,
  .morning-figure[data-framing=full] .avatar.reference-portrait.scene-character{width:40%!important;right:10%!important}
  .morning-figure[data-framing=bust] .avatar.reference-portrait.scene-character,
  .morning-figure[data-framing=bust] .avatar.reference-portrait.scene-character[data-original=true]{
    left:50%!important;right:auto!important;top:8%!important;width:100%!important;
  }
  .morning-room{height:360px;--frame-height:360px}
  .hero .reference-portrait.scene-character,.cutscene-art .reference-portrait.scene-character,
  .cutscene-art.scene-7 .reference-portrait.scene-character{width:40%;right:4%;bottom:-1px}
  .talent-portrait,.talent-option[aria-pressed=true] .talent-portrait{height:185px}
  .creation-launch{bottom:0;width:100%;border-radius:14px 14px 0 0;padding:9px 14px calc(9px + env(safe-area-inset-bottom));gap:7px;grid-template-columns:1fr}
  .creation-launch #start-summary{font-size:11px;gap:5px}
  .creation-launch #start-summary b{display:block;margin-top:0;font-size:10px}
  .creation-launch .start-life{min-height:48px;padding:10px 15px}
  .morning-page{padding-bottom:calc(135px + env(safe-area-inset-bottom))}
  .hero-caption{max-width:57%;left:14px;bottom:14px}
}
@media(max-height:450px){.creation-launch{position:static;transform:none;width:100%;margin-top:20px}.morning-page{padding-bottom:20px}}
