/* Characters: animations and bones (list + player), the wardrobe's textures, tattoos, heritage, damage, relationships. */

/* a list beside a player (animations, bones) */
.anims { display: grid; grid-template-columns: minmax(300px, 460px) 1fr; gap: 20px; align-items: start; }
.anims[hidden] { display: none; }
.amodes { grid-column: 1 / -1; justify-self: start; margin-bottom: var(--s-1); }
.alist { display: grid; gap: 6px; min-width: 0; }
/* the dictionaries as cards; the player in a sheet over them */
#anims.cards-mode { grid-template-columns: minmax(0, 1fr); }
#anims.cards-mode > #aplayer { display: none; }
.alist.cards { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: var(--s-3); }
.asheet #aplayer { position: static; padding: var(--s-5) var(--s-5) 0; }
.asheet #aplayer .stage { height: min(54vh, 560px); }
.asheet-clips { padding: 0 var(--s-5) var(--s-5); }
@media (max-width: 600px) { .alist.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .asheet #aplayer, .asheet-clips { padding-left: var(--s-4); padding-right: var(--s-4); } }
.adict { border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-1); overflow: hidden; transition: border-color var(--d-2) var(--ease); }
.adict:hover { border-color: var(--line-3); }
.adict.open { border-color: var(--line-3); background: var(--surface-2); }
.ahead { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 14px; border: 0; background: none; color: var(--text); text-align: left; }
.ahead code { font: var(--t-code); color: var(--text); overflow-wrap: anywhere; }
.ahead:hover code, .adict.open .ahead code { color: var(--white); }
.ahead span { flex: none; display: flex; align-items: center; gap: var(--s-2); color: var(--dim); font: var(--t-small); }
.ahead .dlc { position: static; padding: 2px 8px; border-radius: var(--r-pill); background: var(--hover-2); color: var(--muted); font: 500 11px/1.4 var(--body); font-style: normal; }
.ahead .dlc.base { display: none; }
.aclips { display: flex; flex-wrap: wrap; gap: 6px; }
/* a dictionary's clips show when it is opened */
.adict .aclips { display: none; padding: 0 12px 12px; }
.adict.open .aclips { display: flex; }
.aplayer { position: sticky; top: 20px; min-width: 0; }
.aplayer .stage { height: min(62vh, 640px); }
.acontrols { display: flex; align-items: center; gap: 10px; margin-top: var(--s-3); }
.acontrols input[type=range] { flex: 1; }
.acontrols span { min-width: 64px; color: var(--muted); font: var(--t-code-small); font-variant-numeric: tabular-nums; }
.aplay { flex: none; display: grid; place-items: center; width: var(--h-md); height: var(--h-md); border: 0; border-radius: 50%; background: var(--grad); color: var(--white); transition: filter var(--d-2) var(--ease); }
.aplay:hover { filter: brightness(1.12); }
.aplay svg { width: 16px; height: 16px; }
.ainfo { display: flex; flex-direction: column; gap: 3px; margin-top: var(--s-4); }
.ainfo b { font: var(--t-section); letter-spacing: var(--ls-section); color: var(--white); overflow-wrap: anywhere; }
.ainfo span { color: var(--dim); font: var(--t-code-small); overflow-wrap: anywhere; }
.aflags { margin-top: var(--s-3); }
.blist { position: sticky; top: 20px; display: grid; gap: 2px; min-width: 0; max-height: calc(100vh - 140px); padding-right: var(--s-1); overflow-y: auto; }
.bone { display: grid; grid-template-columns: 1fr auto 58px 66px; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid transparent; border-radius: var(--r-1); background: var(--surface-1); color: var(--text); text-align: left; transition: border-color var(--d-2) var(--ease), background var(--d-2) var(--ease); }
.bone code { font: var(--t-code-small); font-size: 12.5px; overflow-wrap: anywhere; }
.bone span { color: var(--muted); font: var(--t-small); font-size: 11.5px; }
.bone b, .bone i { color: var(--dim); font: var(--t-code-small); font-style: normal; text-align: right; }
.bone:hover { border-color: var(--line-3); }
.bone.on { border-color: var(--accent-line); background: var(--accent-bg); }
.bone.on code { color: var(--white); }
@media (max-width: 1000px) { .anims { grid-template-columns: 1fr; } .aplayer, .blist { position: static; } .aplayer { order: -1; } .blist { max-height: 60vh; } #anims:not(.picked) .aplayer { display: none; } }

/* a piece's textures, to pick one */
.texlist { display: grid; gap: 4px; }
.texlist button { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2); color: var(--muted); font: var(--t-label); text-align: left; transition: border-color var(--d-2) var(--ease), background var(--d-2) var(--ease); }
.texlist button b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-1); background: var(--sunken); color: var(--text); font: var(--t-code-small); }
.texlist button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.texlist button code { color: var(--faint); font: var(--t-code-small); }
.texlist button:hover { border-color: var(--line-3); color: var(--text); }
.texlist button.on { border-color: var(--accent-line); background: var(--accent-bg); color: var(--white); }

/* tattoos: the design on a soft light ground (they are dark ink on nothing) */
.ticon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-1); background: #d6d0e6; overflow: hidden; }
.ticon img { max-width: 100%; max-height: 100%; }
.tatwrap { display: grid; grid-template-columns: 1fr 160px; gap: var(--s-3); align-items: start; }
.tattex { margin: var(--s-1) 0 0; padding: 10px; border-radius: var(--r-2); background: #d6d0e6; text-align: center; }
.tattex img { width: 100%; }
.tattex figcaption { margin-top: 6px; color: #3b2d63; font: var(--t-code-small); font-size: 10.5px; overflow-wrap: anywhere; }
@media (max-width: 700px) { .tatwrap { grid-template-columns: 1fr; } .tattex { max-width: 200px; } }

/* heritage: portraits to pick, the mix, the face features */
.hicon { display: block; width: 100%; aspect-ratio: 1; margin-bottom: 6px; border-radius: var(--r-1); background: var(--sunken); overflow: hidden; }
.hicon img { width: 100%; height: 100%; object-fit: cover; }
.hmix { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-3); align-items: start; }
.hmix .lstage { height: 360px; }
.hctl { display: grid; gap: var(--s-3); }
.hsex { justify-self: start; }
.hparents { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin-bottom: 14px; }
.hparents button { padding: 0; border: 2px solid transparent; border-radius: var(--r-2); background: var(--sunken); color: var(--muted); overflow: hidden; cursor: pointer; transition: border-color var(--d-2) var(--ease); }
.hparents button:hover { border-color: var(--line-3); }
.hparents button.on { border-color: var(--accent-text); color: var(--text); }
.hparents img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.hparents span { display: block; padding: 2px 0 3px; overflow: hidden; font: 600 9.5px var(--body); text-overflow: ellipsis; white-space: nowrap; }
.hfeat { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px var(--s-4); }
.hfeat .fset span { min-width: 150px; font-size: 12px; }
@media (max-width: 900px) { .hmix { grid-template-columns: 1fr; } }

/* damage: a decal's textures */
.decals { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0; }
.decals img { width: 96px; height: 96px; object-fit: contain; border-radius: var(--r-2); background: repeating-conic-gradient(#2a2a33 0 25%, #1d1d24 0 50%) 0 0 / 16px 16px; }

/* relationships: how a group feels, in the state colours */
/* a relation's badge (inside .ltable, whose plain span style it overrides) */
.ltable .rel { padding: 1px 9px; border-radius: var(--r-pill); font: 600 11.5px/1.6 var(--body); }
.rel.rel-hate { background: var(--danger-bg); color: var(--danger); }
.rel.rel-dislike { background: var(--warning-bg); color: var(--warning); }
.rel.rel-like { background: var(--success-bg); color: var(--success); }
.rel.rel-respect { background: rgba(125, 211, 252, .12); color: #9fd8f7; }
.rel.rel-companion { background: var(--accent-bg); color: var(--lilac-2); }
.rel.rel-neutral { color: var(--muted); }

/* the sheet's header on a phone: the name and the origin, not the model */
@media (max-width: 600px) { .sheet-head .sub { display: none; } .sheet-head h2.title { font-size: 19px; } }

/* heritage: the two parents and the mix */
.hpair { display: flex; align-items: center; gap: 10px; }
.hpair figure { flex: 1; margin: 0; text-align: center; }
.hpair img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-2); background: var(--sunken); }
.hpair figcaption { font: 600 12px var(--body); color: var(--muted); margin-top: 4px; }
.hpair > span { font: 700 18px var(--display); color: var(--faint); }
/* a relationship group: its two lists side by side (one under the other on a phone), the badges centred on the row */
.relcols { column-gap: var(--s-5); }
.relcols .ltable > div { align-items: center; }
