.clothingcraft-codex {
  max-width: 1380px;
}

.cc-proposal-notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: -18px 0 28px;
  padding: 15px 18px;
  background: #f2c66d0d;
  border: 1px solid #f2c66d4d;
  color: #ded0ae;
  font-size: 12px;
}

.cc-proposal-notice strong {
  flex: 0 0 auto;
  color: var(--gold);
}

.cc-toolbar {
  position: sticky;
  top: 10px;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(220px, 330px) 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px;
  background: #0d0b14ee;
  border: 1px solid #332d42;
  box-shadow: 0 14px 35px #0008;
  backdrop-filter: blur(12px);
}

.cc-search {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  background: #08070c;
  border: 1px solid #3c354a;
  border-radius: 3px;
  color: #f6f2fb;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.cc-search:focus { border-color: #a777ff; box-shadow: 0 0 0 3px #a777ff18; }
.cc-search::placeholder { color: #756d80; }

.cc-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cc-filters button {
  padding: 7px 10px;
  background: #16131e;
  border: 1px solid #332e40;
  border-radius: 30px;
  color: #aaa2b8;
  font-size: 11px;
  cursor: pointer;
}

.cc-filters button:hover,
.cc-filters button.active {
  border-color: #a777ff;
  background: #302047;
  color: #fff;
}

.cc-stats {
  color: #8f879b;
  font-size: 11px;
  white-space: nowrap;
}

.cc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cc-card {
  min-width: 0;
  padding: 22px;
  background: linear-gradient(135deg, #15131f, #0c0b11);
  border: 1px solid #2e2940;
  border-top: 2px solid #d08aff;
}

.cc-card[hidden] { display: none; }

.cc-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
}

.cc-result-icon,
.cc-output {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: #0a080f;
  border: 1px solid #a777ff4d;
}

.cc-result-icon { width: 48px; height: 48px; }
.cc-output { width: 58px; height: 58px; }

.cc-card-head img,
.cc-output img,
.cc-slot img,
.cc-pill img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  object-position: top;
  image-rendering: pixelated;
}

.cc-card-head p {
  margin: 0;
  color: #d08aff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}

.cc-card-head h3 { margin: 0; font-size: 19px; line-height: 1.3; }
.cc-card-head code { color: #716a7c; font-size: 9px; }

.cc-recipe-note {
  min-height: 21px;
  margin: 9px 0 12px;
  color: #a69eaf;
  font-size: 11px;
}

.cc-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
}

.cc-visual {
  display: flex;
  align-items: center;
  gap: 9px;
}

.cc-craft-grid {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  grid-template-rows: repeat(3, 42px);
  gap: 3px;
  padding: 6px;
  background: #08070c;
  border: 1px solid #40394e;
  box-shadow: inset 0 0 18px #000;
}

.cc-slot {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #292532;
  border: 2px solid;
  border-color: #474150 #17141d #17141d #474150;
}

.cc-slot.empty { opacity: .35; }
.cc-slot img { width: 32px; height: 32px; }
.cc-arrow { color: #8b8098; font-size: 25px; }
.cc-output img { width: 40px; height: 40px; }

.cc-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.cc-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 39px;
  padding: 5px 7px;
  overflow: hidden;
  background: #09080d;
  border: 1px solid #ffffff12;
  color: #cbc4d3;
  font-size: 10px;
  line-height: 1.25;
}

.cc-pill img { flex: 0 0 27px; width: 27px; height: 27px; }
.cc-pill span { min-width: 0; }
.cc-pill b { color: #fff; }

@media (max-width: 1120px) {
  .cc-grid { grid-template-columns: 1fr; }
  .cc-toolbar { grid-template-columns: minmax(200px, 280px) 1fr; }
  .cc-stats { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .cc-toolbar { position: static; grid-template-columns: 1fr; }
  .cc-stats { grid-column: auto; }
  .cc-proposal-notice { flex-direction: column; gap: 4px; }
  .cc-card { padding: 18px; }
  .cc-layout { grid-template-columns: 1fr; }
  .cc-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 430px) {
  .cc-summary { grid-template-columns: 1fr; }
  .cc-craft-grid { grid-template-columns: repeat(3, 38px); grid-template-rows: repeat(3, 38px); }
  .cc-slot img { width: 29px; height: 29px; }
}
