.status-badge {
  display: inline-block;
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-empty { background: #f5f5f4; color: #57534e; }
.status-processing { background: #fef3c7; color: #92400e; }
.status-done { background: #d1fae5; color: #065f46; }
.status-failed { background: #fee2e2; color: #991b1b; }

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.75rem;
}

.lesson-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 0.75rem;
  border: 2px dashed #d6d3d1;
  background: #fff;
  transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
}

.lesson-cell.has-content {
  border-style: solid;
}

.lesson-cell.status-empty { background: #fafaf9; }
.lesson-cell.status-processing { background: #fffbeb; border-color: #fcd34d; }
.lesson-cell.status-done { background: #ecfdf5; border-color: #6ee7b7; }
.lesson-cell.status-failed { background: #fef2f2; border-color: #fca5a5; }

.lesson-cell-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.lesson-cell-number {
  font-size: 1.125rem;
  font-weight: 600;
}

.lesson-cell-drop-hint {
  position: absolute;
  inset: auto 0 0.35rem 0;
  text-align: center;
  font-size: 0.625rem;
  color: #a8a29e;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.lesson-cell.is-dragover {
  border-color: #78716c;
  background: #f5f5f4;
  transform: scale(1.03);
}

.lesson-cell.is-dragover .lesson-cell-drop-hint,
.lesson-cell.is-uploading .lesson-cell-drop-hint {
  opacity: 1;
}

.lesson-cell.is-uploading {
  opacity: 0.7;
  pointer-events: none;
}

.lesson-cell.is-error {
  border-color: #ef4444;
}

.legend-swatch {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 0.25rem;
  border: 1px solid #d6d3d1;
}

.legend-swatch.status-empty { background: #fafaf9; }
.legend-swatch.status-processing { background: #fffbeb; border-color: #fcd34d; }
.legend-swatch.status-done { background: #ecfdf5; border-color: #6ee7b7; }
.legend-swatch.status-failed { background: #fef2f2; border-color: #fca5a5; }

select, input[type="file"] {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #d6d3d1;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}
