/* Approved paintings are displayed as paintings. Exact controls and the animated
   battle study remain native UI; no story art is used ahead of its existing gate. */
.cg-identity-frame, .cp-identity-frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 9px;
  background: #102826;
}
.cg-identity-frame > .identity-art, .cp-identity-frame > .identity-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.cg-identity-frame > .character-avatar, .cp-identity-frame > .character-avatar {
  display: none;
  width: 100%;
  height: 100%;
  margin: 0;
}
.cg-identity-frame.is-art-missing > .character-avatar,
.cp-identity-frame.is-art-missing > .character-avatar { display: block; }
.cg-roster-art { width: 38px; min-width: 38px; height: 46px; }
.cg-party-member > span { width: 64px; height: 76px; }
.cg-portrait { position: relative; }
.cg-hero-art { height: 420px; margin: 18px 0 16px; padding-inline: 20px; }
.cg-hero-art > .cg-painted-portrait {
  height: 100%;
  width: 100%;
  border: 1px solid #c6b77c4d;
  border-radius: 18px;
  background: #0c2021;
  box-shadow: 0 12px 30px #06171580;
}
.cg-painted-portrait > .identity-art, .cp-identity-full > .identity-art {
  object-fit: contain;
  object-position: center;
}
.cg-dialog[data-art-view="portrait"] .cg-hero-art > .character-avatar,
.cg-dialog[data-art-view="portrait"] .cg-expression-study,
.cg-dialog[data-art-view="battle"] .cg-painted-portrait { display: none; }
.cg-dialog[data-art-view="battle"] .cg-hero-art { height: 303px; }
.cg-art-views {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 18px 22px 0;
  padding: 4px;
  border: 1px solid #b5c09a3d;
  border-radius: 12px;
  background: #102723;
}
.cg-art-views button {
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  color: #c8d4c3;
  background: transparent;
}
.cg-art-views button[aria-pressed="true"] {
  color: #fff0c9;
  background: #344637;
  border-color: #d6b46b75;
}
.cg-art-views button:hover { border-color: #d6b46b; }
.cg-expression-study { margin-top: 14px; }
.cg-demo { padding-top: 15px; }
.cp-roster-portrait { width: 49px; height: 59px; margin-block: 4px; }
.cp-roster-member.is-unmet .cp-identity-frame { filter: saturate(.65); }
.cp-speaker-portrait { border-bottom: 0; border-radius: 9px; }
.cp-person-hero:has(.cp-identity-full) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 34%);
  min-height: 360px;
  padding: 0;
  gap: 0;
}
.cp-person-hero:has(.cp-identity-full) .cp-person-copy {
  max-width: none;
  padding: 28px;
}
.cp-person-hero:has(.cp-identity-full) .cp-person-art {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: none;
  height: 360px;
  padding: 14px 14px 14px 0;
}
.cp-person-art .cp-identity-full {
  border: 1px solid #d1bd7b6b;
  border-radius: 11px;
  box-shadow: 0 6px 20px #09181266;
}
.cp-progress-portrait > .cp-identity-frame { width: 76%; height: 85%; margin: 7% auto; }

/* A fixed height plus cover had cropped the five-person camp and later plates.
   Keep the whole composition visible, and put its title below the artwork. */
.story-illustration:has(.story-scene-art) {
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  overflow: visible;
  background: #0c2025;
}
.story-illustration:has(.story-scene-art) .story-landscape {
  position: relative;
  inset: auto;
  width: 100%;
  aspect-ratio: 1672 / 941;
}
.story-landscape .story-scene-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.story-illustration:has(.story-scene-art) .story-letterbox {
  position: relative;
  inset: auto;
  padding: 20px 28px;
  background: #122a2b;
  border-top: 1px solid #b6b88c40;
}
.story-illustration:has(.story-scene-art) .story-letterbox h2 {
  font-size: clamp(25px, 3.2vw, 35px);
  line-height: 1.25;
  margin: 6px 0;
  max-width: 100%;
  text-shadow: none;
}
.story-illustration:has(.story-scene-art) .story-letterbox .micro { text-shadow: none; }

@media (max-width: 660px) {
  .cg-portrait { display: flex; flex-direction: column; min-height: 0; }
  .cg-portrait-top { position: relative; padding: 16px 18px 0; }
  .cg-hero-art {
    width: 100%;
    height: 380px;
    margin: 16px 0;
    padding-inline: 18px;
    align-self: auto;
  }
  .cg-dialog[data-art-view="battle"] .cg-hero-art { height: 250px; }
  .cg-portrait-copy { padding: 0 20px; text-align: center; align-self: auto; }
  .cg-portrait-copy .cg-eyebrow { font-size: 11px; }
  .cg-portrait-copy > p { font-size: 14px; }
  .cg-tags { justify-content: center; }
  .cg-tags > span { font-size: 11px; }
  .cg-art-views { margin: 17px 18px 0; }
  .cg-demo { padding: 13px 18px 20px; }
  .cg-expression-study { margin-top: 14px; }
  .cp-person-hero:has(.cp-identity-full) { grid-template-columns: minmax(140px, .8fr) minmax(0, 1fr); }
  .cp-person-hero:has(.cp-identity-full) .cp-person-art { order: -1; padding: 12px 0 12px 12px; height: 320px; }
  .cp-person-hero:has(.cp-identity-full) .cp-person-copy { padding: 20px 16px; }
  .cp-person-hero:has(.cp-identity-full) .cp-person-copy h3 { font-size: 29px; }
  .story-illustration:has(.story-scene-art) .story-letterbox { padding: 18px; }
}

@media (max-width: 420px) {
  .cg-hero-art { height: 330px; }
  .cp-person-hero:has(.cp-identity-full) { grid-template-columns: 1fr; }
  .cp-person-hero:has(.cp-identity-full) .cp-person-art { height: 310px; padding: 16px 16px 0; }
  .cp-person-hero:has(.cp-identity-full) .cp-person-copy { padding: 20px; }
}
