/* Art overhaul: stylized pre-rendered 3D, not a WebGL scene.
   Design variance 4 / motion 2 / density 6. Preserve UI routes and actions.
   Green remains the action accent; region and player colors stay semantic. */
.raster-art { position: relative; display: inline-block; overflow: hidden; }
.art-raster { display: block; width: 100%; height: 100%; object-fit: contain; }
.art-fallback { display: none; width: 100%; height: 100%; }
.art-fallback svg { display: block; width: 100%; height: 100%; }
.art-failed > .art-raster { display: none; }
.art-failed > .art-fallback { display: block; }
.role-portrait { background: #e4ebee; }
.role-portrait .art-raster { object-fit: cover; }
.region-center .region-art { aspect-ratio: 1; width: 100%; max-height: 190px; border-radius: 8px; background: #d4e0e9; }
.region-center { box-shadow: 0 3px 0 var(--line), 0 8px 16px rgb(36 64 53 / .06); }
.map.compact .region-center .region-art { max-height: 115px; }
.region-center strong { flex: 0 0 auto; }
.role-figure { width: 100%; aspect-ratio: 1 / 2; }
.character-profile { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 16px; align-items: start; }
.character-profile-figure { grid-row: span 2; background: var(--subtle); border-radius: var(--radius); padding: 6px; }
.character-profile > div:last-child { display: contents; }
.character-profile p { margin: 0; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.character-profile p:nth-of-type(n+3), .character-profile .attribute-grid { grid-column: 1 / -1; }
.attribute-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; margin: 0; }
.attribute-grid > div { padding: 8px 2px; text-align: center; border-radius: 8px; background: var(--subtle); }
.attribute-grid dt { font-size: 12px; color: var(--muted); }
.attribute-grid dd { margin: 3px 0 0; font-size: 18px; font-weight: 650; }
.character-views { margin-top: 12px; }
.character-views summary { padding: 8px 0; cursor: pointer; }
.turnaround-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; padding: 12px 0; }
.turnaround-grid figure { margin: 0; padding: 4px; background: var(--subtle); border-radius: 8px; }
.turnaround-grid figcaption { text-align: center; color: var(--muted); font-size: 12px; }
.member { position: relative; padding-right: 88px; min-height: 150px; }
.member-figure { position: absolute; right: 8px; bottom: 8px; width: 65px; pointer-events: none; }
.card-illustration { display: block; width: 100%; aspect-ratio: 1; border-radius: 7px; margin-bottom: 10px; background: #d4e0e9; }
.hand { grid-template-columns: 1fr; }
.hand-card { display: grid; grid-template-columns: 82px minmax(0,1fr); column-gap: 12px; align-content: start; padding: 12px; box-shadow: 0 3px 0 var(--line); }
.hand-card > :not(.card-preview-trigger) { grid-column: 2; }
.card-preview-trigger { grid-column: 1; grid-row: 1 / span 4; width: 82px; height: 82px; padding: 0; min-height: 0; overflow: hidden; align-self: start; }
.card-preview-trigger .card-illustration { margin: 0; height: 100%; }
.card-preview-trigger:focus-visible { outline-offset: 2px; }
.hand-card > strong { display: block; line-height: 1.5; }
.hand-card > small:last-child { font-size: 13px; line-height: 1.6; }
.hand-card .hand-category { display: inline-block; }
#card-art-dialog { width: min(520px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 20px; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); }
#card-art-dialog::backdrop { background: rgb(17 32 27 / .72); }
.card-art-content > button { display: block; margin-left: auto; }
.card-art-content h2 { margin: 16px 0; }
.card-art-content > .card-illustration { max-height: 48dvh; }
.card-art-content p { font-size: 14px; line-height: 1.65; }
.entry-diorama { margin: 22px 0; max-width: 440px; }
.entry-diorama .region-art { width: 100%; max-width: 330px; aspect-ratio: 1; display: block; background: #d4e0e9; border-radius: 16px; }
@media (prefers-color-scheme: dark) {
  .character-profile-figure, .turnaround-grid figure { background: #263b36; }
  .role-portrait { background: #44545a; }
}
@media (max-width: 767px) {
  .character-profile { grid-template-columns: 78px minmax(0,1fr); gap: 10px; }
  .character-profile p { font-size: 14px; }
  .hand-card { grid-template-columns: 76px minmax(0,1fr); gap: 4px 10px; }
  .card-preview-trigger { width: 76px; height: 76px; }
  .region-center .region-art { max-height: 125px; }
  .map.compact .region-center .region-art { max-height: 88px; }
  .member { min-height: 130px; }
  .member-figure { width: 55px; }
  .entry-diorama { display: none; }
}
