.cp { display: grid; gap: 20px; }
.cp .kv-msg { margin: 0; }
.cp-work { display: grid; gap: 22px; }

.cp-file { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; }
.cp-file p { margin: 0; }
.cp-file-thumb { width: 64px; height: 64px; display: grid; place-items: center; background: var(--sunken); border-radius: 6px; overflow: hidden; }
.cp-file-thumb canvas { max-width: 100%; max-height: 100%; box-shadow: 0 0 0 1px var(--line); }
.cp-file-name { font-weight: 700; font-size: 1.08rem; overflow-wrap: anywhere; }
@media (max-width: 520px) { .cp-file { grid-template-columns: 64px minmax(0, 1fr); } .cp-file .kv-btn { grid-column: 1 / -1; justify-self: start; } }

.cp-levels { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.cp-level { position: relative; cursor: pointer; }
.cp-level input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.cp-level span {
  display: grid; gap: 4px; height: 100%; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 12px; background: var(--surface);
}
.cp-level strong { font-weight: 700; }
.cp-level small { color: var(--muted); font-size: 0.88rem; line-height: 1.35; }
.cp-level:hover span { border-color: var(--ink); }
.cp-level input:checked + span { border-color: var(--ink); box-shadow: 4px 4px 0 var(--kit); }
.cp-level input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.cp-go { justify-self: start; }

.cp-result { display: grid; gap: 12px; padding-top: 18px; border-top: 2px solid var(--line); }
.cp-result p { margin: 0; }
.cp-bars { display: grid; gap: 6px; max-width: 520px; }
.cp-bar { height: 14px; border-radius: 7px; background: var(--sunken); overflow: hidden; }
.cp-bar span { display: block; height: 100%; border-radius: 7px; transition: width 0.5s ease; }
.cp-bar--before span { background: var(--line); width: 100%; }
.cp-bar--after span { background: var(--kit); }
.cp-numbers { font-size: 1.25rem; font-weight: 720; font-variant-numeric: tabular-nums; }
.cp-result .kv-btn { justify-self: start; }
