/* Roleplay character profiles + directory. Uses theme tokens. */
.ch-page .ch-muted { opacity: .72; font-size: .95em; }
.ch-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ch-alert { padding: 12px 16px; margin: 0 0 14px; border: 1px solid; clip-path: polygon(8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%,0 8px); }
.ch-ok { background: rgba(40,160,90,.18); border-color: rgba(60,200,120,.6); }
.ch-err { background: rgba(200,50,50,.18); border-color: rgba(255,90,90,.6); }
.ch-warn { background: rgba(255,140,0,.15); border-color: rgba(255,140,0,.6); }

.ch-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.ch-portrait { width: 160px; height: 160px; flex: 0 0 auto; overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.06); border: 1px solid var(--accent, #ff8c00); font-size: 56px;
    clip-path: polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px); }
.ch-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-portrait-avatar { border-radius: 0; }
.ch-info { flex: 1 1 260px; min-width: 0; }
.ch-info h1 { margin: 0 0 8px; overflow-wrap: anywhere; }
.ch-places { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.ch-tag { display: inline-block; padding: 2px 10px; margin-left: 6px; font-size: .85em; font-weight: 700; border: 1px solid var(--accent, #ff8c00); color: var(--accent, #ff8c00); }
.ch-callsign { color: inherit; }
.ch-played { margin: 6px 0 0; }
.ch-bio { overflow-wrap: anywhere; }
.ch-grid { margin-top: 16px; }
.ch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ch-list li { display: flex; gap: 12px; align-items: flex-start; }
.ch-ico { flex: 0 0 24px; text-align: center; padding-top: 2px; }
.ch-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ch-chip { display: inline-flex; flex-direction: column; padding: 6px 12px; border: 1px solid var(--chip, #ffab14); border-left-width: 4px; background: rgba(255,255,255,.05); font-weight: 600; }
.ch-chip small { opacity: .7; font-weight: 400; }
.ch-chip-expired { opacity: .55; text-decoration: line-through; }

.ch-form { display: grid; gap: 12px; }
.ch-form textarea { width: 100%; box-sizing: border-box; min-height: 160px; padding: 10px; font: inherit; color: inherit;
    background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.25); }
.ch-label { font-weight: 700; }
.ch-check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.ch-check input { width: 22px; height: 22px; flex: 0 0 auto; }
.ch-save { align-self: flex-start; min-height: 44px; border: 0; cursor: pointer; }

.ch-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; align-items: center; }
.ch-filter input[type=search], .ch-filter select { flex: 1 1 200px; min-height: 44px; padding: 0 12px; font: inherit; color: inherit;
    background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.25); }
.ch-filter select option, .ch-filter select optgroup { color: #111; }
.ch-filter .apply-btn { min-height: 44px; border: 0; cursor: pointer; }
.ch-clear { min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; }

.ch-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ch-card { display: flex; gap: 14px; align-items: center; padding: 12px; text-decoration: none; color: inherit; min-height: 44px;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.18);
    clip-path: polygon(8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%,0 8px); }
.ch-card:hover, .ch-card:focus-visible { border-color: var(--accent, #ff8c00); background: rgba(255,255,255,.09); }
.ch-thumb { width: 64px; height: 64px; flex: 0 0 auto; overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.06); font-size: 26px; }
.ch-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ch-card-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.ch-card-name { overflow-wrap: anywhere; }
.ch-card-line { font-size: .9em; overflow-wrap: anywhere; }
.ch-pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin: 20px 0; }
.ch-pager a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--accent, #ff8c00); text-decoration: none; }

@media (max-width: 600px) {
    .ch-head { flex-direction: column; align-items: flex-start; }
    .ch-portrait { width: 120px; height: 120px; }
}
