.companion-profile { min-height: 100%; display: flex; flex-direction: column; background: #120d1c; color: #fff5fa; }
.cp-hero { position: relative; isolation: isolate; min-height: clamp(280px,55dvh,485px); display: flex; align-items: end; }
.cp-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; z-index: -2; }
.cp-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg,#120d1c 0%,#120d1cb5 17%,transparent 53%,#120d1c43); }
.companion-profile svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; width: 20px; height: 20px; }
body.pwa-only .companion-profile :is(.cp-back,.cp-save) {
 display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
 border: 1px solid #91647d; border-radius: 14px; background: #28192de6; color: #fff3fa;
}
.cp-back { position: absolute; top: 12px; left: 14px; }
.cp-identity { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.cp-identity img { border: 1px solid #ffadd2; border-radius: 14px; object-fit: cover; }
.companion-profile .cp-identity h1 { margin: 0; font-size:var(--type-title); line-height: 1.05; letter-spacing: -.045em; }
.cp-identity p { margin: 5px 0 0; color: #ffc6de; font-size:var(--type-secondary); }
.cp-content { flex: 1; padding: 6px 15px 15px; }
.cp-about { padding: 12px 13px; border: 1px solid #3a2a46; border-radius: 15px; background: #1b1428; }
.companion-profile .cp-content h2 { margin: 0; font-size:var(--type-section); }
.cp-about p { margin: 6px 0 0; color: #e0d3e8; font-size:var(--type-body); line-height: 1.6; }
.cp-footer {
 display: flex; align-items: center; gap: 8px; position: sticky; z-index: 1; bottom: 0;
 padding: 9px 14px calc(10px + env(safe-area-inset-bottom,0px));
 border-top: 1px solid #4d3052; background: #160e20f2; backdrop-filter: blur(12px);
}
body.pwa-only .companion-profile .cp-save[aria-pressed=true] { background: #652345; color: #ffb7dc; }
.cp-save[aria-pressed=true] svg { fill: currentColor; }
body.pwa-only .companion-profile .cp-play {
 flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
 border: 1px solid #ffacd4; border-radius: 14px; background: linear-gradient(115deg,#c72878,#a21853); color: white; font-weight: 750;
}
.companion-profile button:focus-visible { outline:none;background-color:#35273d; outline-offset: -5px; }
body.pwa-only .companion-profile .cp-save { border:0;box-shadow:none; }

.cp-traits { padding: 16px 2px 6px; }
.companion-profile .cp-traits h2 { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: #c9b4d0; }
.cp-traits ul { display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 9px 0 0; list-style: none; }
.cp-traits li { border: 1px solid #533456; border-radius: 7px; padding: 4px 8px; background: #2c1833; color: #ffc3df; font-size: 11px; font-weight: 650; }

.cp-hero-empty { min-height:152px;background:radial-gradient(at 90% 10%,#382039,transparent 75%); }
.cp-reference-count { margin:0 0 9px;padding:8px 11px;border-radius:11px;background:#20152b;color:#d8bbd8;font-size:var(--type-secondary); }
.cp-reference-count b { color:#fff1f8; }
.cp-footer { display:grid;gap:6px; }
.cp-footer-actions { display:flex;align-items:center;gap:8px; }
body.pwa-only .companion-profile .cp-swap { border:0;background:#26192c;color:#f5b1d4;font-size:var(--type-secondary); }
