body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #fdf7f2;
  color: #444;
  padding: 20px;
}

h1, h2, h3 {
  color: #b77e66;
}

select {
  padding: 5px;
  margin-bottom: 10px;
}

#braceletCounter {
  font-weight: bold;
  margin: 10px 0;
  color: #b77e66;
}

#braceletPreviewContainer {
  overflow-x: auto;
  white-space: nowrap;
  border: 2px dashed #e0b9a4;
  padding: 10px;
  margin-bottom: 20px;
}

#braceletPreview {
  display: flex;
  gap: 10px;
}

.bracelet-slot {
  width: 60px;
  height: 80px;
  border: 2px solid #ccc;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-shrink: 0;
  overflow: visible;
  position: relative;
}

.bracelet-slot img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.bracelet-slot.empty {
  background-color: transparent;
  border: 2px dashed #ddd;
}

.bracelet-slot button {
  position: absolute;
  top: 2px;
  right: 2px;
  background: red;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  z-index: 10;
}

.charm-group-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#customCharms {
  margin-top: 10px;
}


.charm {
  padding: 6px;
  border: 1px solid #ccc;
  background-color: #ffece0;
  border-radius: 8px;
  text-align: center;
  cursor: grab;
  width: 70px;
  box-sizing: border-box;
}

.charm img {
  max-width: 100%;
  height: 40px;
  display: block;
  margin: 0 auto 4px;
  object-fit: contain;
}

.charm[data-name="Moon-Star Chain"] {
  background-color: #fff2ec;
  border-color: #e6a89e;
}

.category {
  margin-bottom: 15px;
}

.category-header {
  display: block;
  background-color: #f8e4d8;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.category-header:hover {
  background-color: #f1d2c3;
}

.toggle:checked + .category-header + .collapsible {
  display: flex;
}

.collapsible {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th, td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

#cropContainer {
  margin-top: 10px;
}

#cropImage {
  max-width: 100%;
  max-height: 200px;
}

.dangling {
  height: 100px;
  margin-top: -10px;
}
